From 9bb22074cc41bc5dd986212e2c8aa7ca8c016ead Mon Sep 17 00:00:00 2001 From: Alexander Frolov Date: Thu, 5 Jan 2017 00:39:10 +0400 Subject: [PATCH] code style fixes --- plugins/ubuntu/ubuntu.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/ubuntu/ubuntu.plugin.zsh b/plugins/ubuntu/ubuntu.plugin.zsh index 7aed88e96..4828e15d2 100644 --- a/plugins/ubuntu/ubuntu.plugin.zsh +++ b/plugins/ubuntu/ubuntu.plugin.zsh @@ -27,9 +27,9 @@ compdef _afu afu='sudo apt-file update' alias ppap='sudo ppa-purge' compdef _ppap ppap='sudo ppa-purge' -AG_COMMAND=$(command -v ag) -if [[ -z $AG_COMMAND ]]; then - alias ag='sudo apt-get' # age - but without sudo +local has_ag_command=$(command -v ag) +if [[ -z $has_ag_command ]]; 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 @@ -44,8 +44,8 @@ alias agug='sudo apt-get upgrade' # ag alias aguu='sudo apt-get update && sudo apt-get upgrade' #adg alias agar='sudo apt-get autoremove' -if [[ -z $AG_COMMAND ]]; then - compdef _ag ag='sudo apt-get' +if [[ -z $has_ag_command ]]; then + compdef _ag ag='sudo apt-get' fi compdef _aga aga='sudo apt-get autoclean' compdef _agb agb='sudo apt-get build-dep'