mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 09:36:41 -04:00
shells/zsh: add completion for mdo(1)
This commit is contained in:
parent
357a3a9d08
commit
ef64775074
3 changed files with 22 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
PORTNAME= zsh
|
||||
DISTVERSION= 5.9
|
||||
PORTREVISION= 4
|
||||
PORTREVISION= 5
|
||||
CATEGORIES= shells
|
||||
MASTER_SITES= https://www.zsh.org/pub/ \
|
||||
SF \
|
||||
|
@ -107,6 +107,8 @@ post-build:
|
|||
${WRKSRC}/Doc/zshall.1)
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${FILESDIR}/_mdo \
|
||||
${STAGEDIR}/${DATADIR}/${ZSH_VER}/functions/Completion/Unix/
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/site-functions
|
||||
${LN} -f ${STAGEDIR}${PREFIX}/bin/zsh ${STAGEDIR}${PREFIX}/bin/rzsh
|
||||
# Precompile completions and functions
|
||||
|
|
18
shells/zsh/files/_mdo
Normal file
18
shells/zsh/files/_mdo
Normal file
|
@ -0,0 +1,18 @@
|
|||
#compdef mdo
|
||||
|
||||
local environ e cmd cpp
|
||||
local -a _comp_priv_prefix
|
||||
local -A opt_args
|
||||
|
||||
zstyle -a ":completion:${curcontext}:" environ environ
|
||||
|
||||
for e in "${environ[@]}"
|
||||
do local -x "$e"
|
||||
done
|
||||
|
||||
cmd="$words[1]"
|
||||
cpp='_comp_priv_prefix=( $cmd -n ${(kv)opt_args[(I)-u]} )'
|
||||
_arguments -s -S -A '-*' : \
|
||||
'-u+[run command as specified user]: :_users' \
|
||||
'-i[keep the calling user]' \
|
||||
"*:: :{ $cpp; _normal }"
|
|
@ -627,6 +627,7 @@ bin/zsh-%%ZSH_VER%%
|
|||
%%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_make
|
||||
%%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_man
|
||||
%%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_md5sum
|
||||
%%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_mdo
|
||||
%%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_mencal
|
||||
%%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_mh
|
||||
%%DATADIR%%/%%ZSH_VER%%/functions/Completion/Unix/_mime_types
|
||||
|
|
Loading…
Add table
Reference in a new issue