mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 00:51:05 +02:00
22947: minor mkdir completion fixes.
This commit is contained in:
parent
9471bbcfa0
commit
8dfddcaaf4
2 changed files with 11 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-11-02 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
|
* 22947: R. Ramkumar: Completion/Unix/Command/_mkdir:
|
||||||
|
minor mkdir completion fixes.
|
||||||
|
|
||||||
2006-11-01 Peter Stephenson <pws@csr.com>
|
2006-11-01 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
* 22934, with modifications (c.f. 22937): INSTALL, README,
|
* 22934, with modifications (c.f. 22937): INSTALL, README,
|
||||||
|
|
|
@ -5,23 +5,23 @@ local curcontext="$curcontext" line state \
|
||||||
typeset -a opt_args
|
typeset -a opt_args
|
||||||
|
|
||||||
args=(
|
args=(
|
||||||
'(-m --mode=)'{-m,--mode=}'[set permission mode]:numeric mode'
|
'(-m --mode)'{-m,--mode=}'[set permission mode]:numeric mode'
|
||||||
'(-p --parents)'{-p,--parents}'[make parent directories as needed]'
|
'(-p --parents)'{-p,--parents}'[make parent directories as needed]'
|
||||||
)
|
)
|
||||||
|
|
||||||
args_zsh=('(-)*: :->dir')
|
args_zsh=('(-)*: :->directories')
|
||||||
|
|
||||||
args_cmd=(
|
args_cmd=(
|
||||||
'(-v --verbose)'{-v,--verbose}'[print message for each created directory]'
|
'(-v --verbose)'{-v,--verbose}'[print message for each created directory]'
|
||||||
'(- :)--help[display help information]'
|
'(- :)--help[display help information]'
|
||||||
'(- :)--version[display version information]'
|
'(- :)--version[display version information]'
|
||||||
'*: :->dir'
|
'*: :->directories'
|
||||||
)
|
)
|
||||||
|
|
||||||
case "$OSTYPE" in
|
case "$OSTYPE" in
|
||||||
linux*)
|
linux*)
|
||||||
args_cmd=(
|
args_cmd=(
|
||||||
'(-Z --context=)'{-Z,--context=}'[set SELinux context]:SELinux context'
|
'(-Z --context)'{-Z,--context=}'[set SELinux context]:SELinux context'
|
||||||
$args_cmd)
|
$args_cmd)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -56,10 +56,10 @@ fi
|
||||||
_arguments -C -s $args && ret=0
|
_arguments -C -s $args && ret=0
|
||||||
|
|
||||||
case "$state" in
|
case "$state" in
|
||||||
dir)
|
directories)
|
||||||
if (( $ret )) && [[ ! -prefix - ]] || \
|
if (( $ret )) && [[ ! -prefix - ]] || \
|
||||||
[[ $variant == zsh && ${#${${words[2,-1]}:#-*}} -gt 0 ]]; then
|
[[ $variant == zsh && ${#${${words[2,-1]}:#-*}} -gt 0 ]]; then
|
||||||
_wanted parent-directory expl \
|
_wanted directories expl \
|
||||||
'parent directory (alternatively specify name of directory)' \
|
'parent directory (alternatively specify name of directory)' \
|
||||||
_path_files -/ || _message 'name of directory'
|
_path_files -/ || _message 'name of directory'
|
||||||
ret=0
|
ret=0
|
||||||
|
|
Loading…
Reference in a new issue