From b50e950f0ea2a5fdfc8d312d1a6eb4f4e6240fa0 Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Tue, 8 Dec 2015 08:40:44 +0100 Subject: 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. --- etc/bash_completion.d/brew | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'etc') 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 ;; -- cgit v1.2.3