mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
Plugins: ubuntu - account for silversearcher
The alias 'ag' in the ubuntu plugin causes conflicts if the user also has The Silver Searcher ( http://geoff.greer.fm/ag/ ) installed. This patch checks to see if the silversearcher binary is available, if so, the aliases is not made.
This commit is contained in:
parent
140034605e
commit
53684238b8
1 changed files with 8 additions and 4 deletions
|
|
@ -26,7 +26,9 @@ compdef _afu afu='sudo apt-file update'
|
|||
alias ppap='sudo ppa-purge'
|
||||
compdef _ppap ppap='sudo ppa-purge'
|
||||
|
||||
alias ag='sudo apt-get' # age - but without sudo
|
||||
if [[ -z $(command -v ag) ]]; then
|
||||
alias ag='sudo apt-get' # age - but without sudo
|
||||
fi
|
||||
alias aga='sudo apt-get autoclean' # aac
|
||||
alias agb='sudo apt-get build-dep' # abd
|
||||
alias agc='sudo apt-get clean' # adc
|
||||
|
|
@ -39,7 +41,9 @@ alias agud='sudo apt-get update && sudo apt-get dist-upgrade' #adu
|
|||
alias agug='sudo apt-get upgrade' # ag
|
||||
alias aguu='sudo apt-get update && sudo apt-get upgrade' #adg
|
||||
|
||||
compdef _ag ag='sudo apt-get'
|
||||
if [[ -z $(command -v ag) ]]; then
|
||||
compdef _ag ag='sudo apt-get'
|
||||
fi
|
||||
compdef _aga aga='sudo apt-get autoclean'
|
||||
compdef _agb agb='sudo apt-get build-dep'
|
||||
compdef _agc agc='sudo apt-get clean'
|
||||
|
|
@ -73,11 +77,11 @@ aar() {
|
|||
else
|
||||
read "PACKAGE?Type in the package name to install/upgrade with this ppa [${1##*/}]: "
|
||||
fi
|
||||
|
||||
|
||||
if [ -z "$PACKAGE" ]; then
|
||||
PACKAGE=${1##*/}
|
||||
fi
|
||||
|
||||
|
||||
sudo apt-add-repository $1 && sudo apt-get update
|
||||
sudo apt-get install $PACKAGE
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue