Skip to content

Instantly share code, notes, and snippets.

@mamemomonga

mamemomonga/alias.md

Last active Feb 15, 2021
Embed
What would you like to do?
便利なAlias

便利なAlias

  • macOS Catalina
  • ~/.bashrc, ~/.zshrc に設定する

lsの色と設定

export LSCOLORS=exfxcxdxbxegedabagacad
alias ls="ls -vG"
alias ll="ls -alG"

画面ロック

alias lock="'/System/Library/CoreServices/Menu Extras/User.menu/Contents/Resources/CGSession' -suspend"

PathFinder

alias pf="open -a 'Path Finder'"

NHKらじるらじる

alias nhkfm='open "https://www.nhk.or.jp/radio/player/?ch=fm&area=osaka"'
alias nhkr1='open "https://www.nhk.or.jp/radio/player/?ch=r1&area=osaka"'

Visual Studio Code

alias vsc="open -a 'Visual Studio Code'"

Remote Desktop

alias rdp="open -a 'Microsoft Remote Desktop'"

カレントディレクトリのgitリポジトリのルートを開く

alias git-root='git rev-parse --show-superproject-working-tree --show-toplevel | head -1'

利用例

VisualStudioCodeでカレントディレクトリのgitリポジトリのルートを開く

$ vsc $(git-root)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment