diff options
author | Oliver Kiddle <opk@zsh.org> | 2015-05-03 16:53:47 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2015-05-03 16:53:57 +0200 |
commit | ab7ec8d9851fea8230e1ccfba284c5bfaf457d88 (patch) | |
tree | 837b14c838b96728ebdb530eb20d35737ef8419b /Completion/Unix/Command/_rm | |
parent | b29278c69a67089ba225a98478069eb3f32ab4e6 (diff) | |
download | zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.tar.gz zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.tar.xz zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.zip |
35011: update completions for some common Unix commands,
in particular improving FreeBSD support
Diffstat (limited to 'Completion/Unix/Command/_rm')
-rw-r--r-- | Completion/Unix/Command/_rm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm index 1f156c481..4728ad464 100644 --- a/Completion/Unix/Command/_rm +++ b/Completion/Unix/Command/_rm @@ -1,4 +1,4 @@ -#compdef rm +#compdef rm grm zf_rm declare -a opts args args=( @@ -16,12 +16,25 @@ if _pick_variant gnu=gnu unix --help; then '--one-file-system[stay within filesystems of files given as arguments]' '( --preserve-root)--no-preserve-root[do not treat / specially]' '(--no-preserve-root )--preserve-root[do not remove / (default)]' + '(-d --dir)'{-d,--dir}'[remove directories as well]' '(-v --verbose)'{-v,--verbose}'[explain what is being done]' '(- *)--help[display help message and exit]' '(- *)--version[output version information and exit]' ) else args=(${args:#*--(force|recursive)\[*}) + case $OSTYPE in + freebsd*) + args+=( + '-d[remove directories as well]' + '(-i)-I[prompt when removing many files]' + '-P[overwrite files before deleting them]' + '-v[explain what is being done]' + '-W[attempt to undelete named files]' + "-x[don't cross file systems when removing a hierarchy]" + ) + ;; + esac fi local curcontext=$curcontext state line ret=1 |