Skip to content

Instantly share code, notes, and snippets.

@mamemomonga
Last active February 15, 2021 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mamemomonga/e55d8dbfef7453119b6570174fe75130 to your computer and use it in GitHub Desktop.
Save mamemomonga/e55d8dbfef7453119b6570174fe75130 to your computer and use it in GitHub Desktop.
便利な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