diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-01-31 14:34:46 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-01-31 14:34:46 +0100 |
commit | 9e313ffadacf7290645b153fd799b86ab4498e9e (patch) | |
tree | e282ed42a696b0b05ac5a154fa6d2789df8326fc /etc/alias | |
parent | 00837517d0781291b1fddb02577cc5baed23df18 (diff) |
short aliases: Only set git/hg aliases if git/hg are available
Diffstat (limited to 'etc/alias')
-rw-r--r-- | etc/alias/short | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/etc/alias/short b/etc/alias/short index cab5409..164b0ac 100644 --- a/etc/alias/short +++ b/etc/alias/short @@ -21,38 +21,42 @@ alias fbif='fbi -a' alias fbij='fbi -a -u' ## Git -alias gita='git add' -alias gitc='git commit -v' -alias gitd='git diff --color' -alias gitdc='gitd --cached' -alias gitf='git pull' -alias gitl='git log' -alias gitp='git push' -alias gits='git status' -alias grep-nogit='grep --exclude-dir=.git -r' -alias git-serve='git-daemon --verbose --export-all --base-path=. .' +if check_com -c git; then + alias gita='git add' + alias gitc='git commit -v' + alias gitd='git diff --color' + alias gitdc='gitd --cached' + alias gitf='git pull' + alias gitl='git log' + alias gitp='git push' + alias gits='git status' + alias grep-nogit='grep --exclude-dir=.git -r' + alias git-serve='git-daemon --verbose --export-all --base-path=. .' +fi for i in ~/var/gtd/*(.N); { alias gtd-${i:t}='todo --database '$i } ## Mercurial (hg) -alias hga='hg add' -alias hgar='hg addremove' -alias hgc='hg commit' -alias hgd='hg diff | less' -alias hgf='hg fetch' -alias hgg='hg glog | less' -alias hgh='hg heads' -alias hgi='hg incoming' -alias hgl='hg log | less' -alias hgm='hg merge' -alias hgp='hg push' -alias hgrm='hg remove' -alias hgrv='hg revert' -alias hgs='hg status' -alias hgu='hg update' -alias hgv='hg verify' +if check_com -c hg; then + alias hga='hg add' + alias hgar='hg addremove' + alias hgc='hg commit' + alias hgd='hg diff | less' + alias hgf='hg fetch' + alias hgg='hg glog | less' + alias hgh='hg heads' + alias hgi='hg incoming' + alias hgl='hg log | less' + alias hgm='hg merge' + alias hgp='hg push' + alias hgrm='hg remove' + alias hgrv='hg revert' + alias hgs='hg status' + alias hgu='hg update' + alias hgv='hg verify' +fi # File listings alias lsb='tar tvjf' |