「よく使うalias」の版間の差分
ナビゲーションに移動
検索に移動
| 24行目: | 24行目: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
alias ..='cd ..' | alias ..='cd ..' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
2019年3月7日 (木) 05:54時点における版
aliasを記載する場所
~/.bash_profile
or
/etc/bashrc
aliasを即反映
$ source ~/.bash_profile
alias集
ls関連
alias ll='ls -lhA --color=auto'
git関連
alias gl='git log --oneline --decorate=full --graph --branches --tags --remotes --date=iso --format="%C(yellow)%H%C(reset) %C(magenta)[%ad]%C(reset) %C(cyan)@%an%C(reset) %C(auto)%d%C(reset) %s"'
cd関連
alias ..='cd ..'
まとめ
黙ってこれをコピペ
alias ll='ls -lhA --color=auto'
alias gl='git log --oneline --decorate=full --graph --branches --tags --remotes --date=iso --format="%C(yellow)%H%C(reset) %C(magenta)[%ad]%C(reset) %C(cyan)@%an%C(reset) %C(auto)%d%C(reset) %s"'
alias ..='cd ..'