「よく使うalias」の版間の差分
ナビゲーションに移動
検索に移動
ページの作成:「=== aliasを記載する場所 === ~/.bash_profile === aliasを即反映 === <syntaxhighlight lang="bash"> $ source ~/.bash_profile </syntaxhighlight> === alias集 ==...」 |
編集の要約なし |
||
| 12行目: | 12行目: | ||
==== lsの代用 ==== | ==== lsの代用 ==== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
alias ll='ls -lhA' | alias ll='ls -lhA --color=auto' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| 18行目: | 18行目: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
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"' | ||
</syntaxhighlight> | |||
==== 親ディレクトリへの移動 ==== | |||
<syntaxhighlight lang="bash"> | |||
alias ..='cd ..' | |||
</syntaxhighlight> | |||
=== まとめ === | |||
黙ってこれをコピペ | |||
<syntaxhighlight lang="bash"> | |||
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 ..' | |||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:よく使う]] | [[Category:よく使う]] | ||
2019年3月7日 (木) 05:32時点における版
aliasを記載する場所
~/.bash_profile
aliasを即反映
$ source ~/.bash_profile
alias集
lsの代用
alias ll='ls -lhA --color=auto'
gitのlog
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 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 ..'