「よく使うalias」の版間の差分
		
		
		
		ナビゲーションに移動
		検索に移動
		
編集の要約なし  | 
				|||
| 14行目: | 14行目: | ||
<syntaxhighlight lang="bash">  | <syntaxhighlight lang="bash">  | ||
alias ll='ls -lhA --color=auto'  | alias ll='ls -lhA --color=auto'  | ||
</syntaxhighlight>  | |||
==== grep関連 ====  | |||
<syntaxhighlight lang="bash">  | |||
alias grep='grep --color=auto'  | |||
</syntaxhighlight>  | </syntaxhighlight>  | ||
| 30行目: | 35行目: | ||
<syntaxhighlight lang="bash">  | <syntaxhighlight lang="bash">  | ||
alias ll='ls -lhA --color=auto'  | alias ll='ls -lhA --color=auto'  | ||
alias grep='grep --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 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 ..'  | alias ..='cd ..'  | ||
2019年3月15日 (金) 04:23時点における版
aliasを記載する場所
~/.bash_profile
or
/etc/bashrc
aliasを即反映
$ source ~/.bash_profile
alias集
ls関連
alias ll='ls -lhA --color=auto'
grep関連
alias grep='grep --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 grep='grep --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 ..'