LoginSignup
1
4

More than 3 years have passed since last update.

alias(エイリアス) の設定の仕方

Posted at

bash の場合は、基本的に ~/.bash_profile
zshの場合は ~/.zshrc に記述するのがスタンダードです。

試しに登録してみましょう。(zshの場合)
$ vim ~/.zshrc

以下のような記述を追記します(これは例ですので、自分の好きに登録してOKです)。

alias gs="git status”
alias gd="git diff”
alias gc="git checkout”
alias gb="git branch”
alias gl="git log”
alias rs=“rails s”
alias rc=“rails c”

で、

$ source ~/.zshrc
を実行すると、使えるようになる。

1
4
0

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
1
4