From ab7ec8d9851fea8230e1ccfba284c5bfaf457d88 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Sun, 3 May 2015 16:53:47 +0200 Subject: 35011: update completions for some common Unix commands, in particular improving FreeBSD support --- Completion/Unix/Command/_rm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_rm') 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 -- cgit 1.4.1