summaryrefslogtreecommitdiff
path: root/etc/alias
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-01-31 14:34:46 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2009-01-31 14:34:46 +0100
commit9e313ffadacf7290645b153fd799b86ab4498e9e (patch)
treee282ed42a696b0b05ac5a154fa6d2789df8326fc /etc/alias
parent00837517d0781291b1fddb02577cc5baed23df18 (diff)
short aliases: Only set git/hg aliases if git/hg are available
Diffstat (limited to 'etc/alias')
-rw-r--r--etc/alias/short56
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'