「よく使うalias」の版間の差分

提供: オレッジベース
移動先: 案内検索
(aliasを記載する場所)
2行目: 2行目:
 
~/.bash_profile<br />
 
~/.bash_profile<br />
 
or<br />
 
or<br />
/etc/bashrc
+
/etc/bashrc<br />
 +
or<br />
 +
/etc/bash.bashrc
  
 
=== aliasを即反映 ===
 
=== aliasを即反映 ===

2019年3月19日 (火) 08:05時点における版

aliasを記載する場所

~/.bash_profile
or
/etc/bashrc
or
/etc/bash.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 ..'