LoginSignup
3
3

More than 5 years have passed since last update.

文脈に応じて内容が変わるエイリアス

Last updated at Posted at 2012-04-12

Git リポジトリの中で st したら git status になり、 Mercurial リポジトリの中で st したら hg status になる。そういうエイリアスを定義できるスクリプトを書いた。

こんな感じで使える:

$ csalias ctx_git st 'git status'
$ csalias ctx_hg st 'hg status'

$ cd git-repo
$ st
# On branch master
nothing to commit (working directory clean)

$ cd hg-repo
$ st
? readme.txt

$ cd not-a-repo
$ st
zsh: command not found: st

ブログにも同じこと書いたぞ

3
3
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3