aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorMartin Afanasjew2015-12-08 08:40:44 +0100
committerMartin Afanasjew2016-04-06 10:31:54 +0200
commitb50e950f0ea2a5fdfc8d312d1a6eb4f4e6240fa0 (patch)
tree512e47872cb991562f6054180449ec4e01ea8e39 /etc
parentdcf406f1e42ac15718e2dcbee98fcb7e22f4f27b (diff)
downloadbrew-b50e950f0ea2a5fdfc8d312d1a6eb4f4e6240fa0.tar.bz2
unlinkapps: add --dry-run option
Add `--dry-run` option as is customary for destructive commands. Update `bash` completion and man page accordingly. Also correct and update documentation for both `brew linkapps` and `brew unlinkapps` in more general terms.
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/brew15
1 files changed, 14 insertions, 1 deletions
diff --git a/etc/bash_completion.d/brew b/etc/bash_completion.d/brew
index 6e3cc76c3..4f52205bc 100644
--- a/etc/bash_completion.d/brew
+++ b/etc/bash_completion.d/brew
@@ -487,6 +487,18 @@ _brew_uninstall ()
__brew_complete_installed
}
+_brew_unlinkapps ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --*)
+ __brewcomp "--dry-run --local"
+ return
+ ;;
+ esac
+ __brew_complete_installed
+}
+
_brew_unpack ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -589,7 +601,7 @@ _brew ()
install|instal|reinstall) _brew_install ;;
irb) _brew_irb ;;
link|ln) _brew_link ;;
- linkapps|unlinkapps) _brew_linkapps ;;
+ linkapps) _brew_linkapps ;;
list|ls) _brew_list ;;
log) _brew_log ;;
man) _brew_man ;;
@@ -609,6 +621,7 @@ _brew ()
tap-unpin) _brew_tap_unpin ;;
tests) _brew_tests ;;
uninstall|remove|rm) _brew_uninstall ;;
+ unlinkapps) _brew_unlinkapps ;;
unpack) _brew_unpack ;;
unpin) __brew_complete_formulae ;;
untap|tap-info|tap-pin) __brew_complete_tapped ;;