From c001d1f2a2eb7c3ddea1c1f09ca6660070befaa3 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Wed, 7 Sep 2016 07:41:24 -0500 Subject: 39221: update rm completion for BSD --- Completion/Unix/Command/_rm | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'Completion/Unix/Command/_rm') diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm index 4d0dbdb3f..4a5c9a178 100644 --- a/Completion/Unix/Command/_rm +++ b/Completion/Unix/Command/_rm @@ -22,16 +22,24 @@ if _pick_variant gnu=gnu unix --help; then '(- *)--version[output version information and exit]' ) else - args=(${args:#*--(force|recursive)\[*}) + args=(${args:#*)--*\[*}) case $OSTYPE in - freebsd*) + dragonfly*|freebsd*|netbsd*|openbsd*) 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]" + '-P[overwrite files before deleting them]' + ) + ;; + dragonfly*|freebsd*|netbsd*) + args+=( + '-v[explain what is being done]' + '-W[attempt to undelete named files]' + "-x[don't cross file systems when removing a hierarchy]" + ) + ;; + dragonfly*|freebsd*) + args+=( + '(-i)-I[prompt when removing many files]' ) ;; esac -- cgit 1.4.1