1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

aliasを晒す

1
Posted at
# VIM
alias vi="vim"

# Memo
export MEMO_PATH="${HOME}/Documetns/memo.txt"
alias memo="vi ${MEMO_PATH}"

# Change directory
alias g="cd ~/Git"
alias p="cd ~/Git/project"
alias d="cd ~/Documents"
alias ..="cd ../"
alias ....="cd ../../"
alias ......="cd ../../../../"
alias ........="cd ../../../../../"

# Git Alias
alias gti="git"
alias gb="git branch"
alias gba="git branch -a"
alias gcb="git checkout -b "
alias gpouh="git push -u origin HEAD"
alias gs="git status"
alias gd="git diff"
alias gr="git reset"
alias ga="git add"
alias gA="git add --all"
alias gaa="gA"
alias gaA="gA"
alias gc="git commit -m"
alias gcz="git cz"
alias gp="git pull"
alias gP="git push"
alias gf="git fetch"
alias gl="git log --pretty='format:%C(yellow)%h %C(green)%cd %C(reset)%s %C(red)%d %C(cyan)[%an]' --date=iso"
alias glg="gl --graph"
alias gacp="git pull && git add --all && git commit -m 'Sync by $(uname) in $(whoami)@$(hostname)' && git push"
alias exclude="vi .git/info/exclude"
alias pushg='git stash push'
alias popg='git stash pop'
alias gglist='git stash list'

# Docker, docker-compose
alias docker-compose="docker compose"
alias dc="docker-compose"
alias dcup="docker-compose up"
alias dcupd="docker-compose up -d"
alias dcstop="docker-compose stop"
alias dcrm="docker-compose rm"
alias dclog="docker-compose log"
alias dctail="docker-compose log tail"
alias dcexec="docker-compose exec"

alias ssh-keygen="ssh-keygen -t ed25519 -C '' -N ''"
alias sc="sudo systemctl"

# PlantUML
alias pu="docker run -d -p 38880:8080 plantuml/plantuml-server:jetty"

# Open a Applications
if [ `uname` = "Darwin" ]; then
  # macos
  alias code="open -a 'Visual Studio Code' ."
  alias finder="open -a Finder ."
  alias edit="open -a 'CotEditor'"
  alias clip="pbcopy"
elif [ `uname` = "Linux" ]; then
  # Linux
  alias code="code ."
  alias finder="oeen ."
  alias pbcopy="xsel --clipboard --input"
  alias clip="pdbopy"
fi

# Terminal commands
alias reset="stty sane"

# Functions
alias upper="/usr/bin/env python -c \"import sys;print(sys.argv[1].upper())\""
alias lower="/usr/bin/env python -c \"import sys;print(sys.argv[1].lower())\""
alias rmpyc='find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf'

# reset
alias lll="exec ${SHELL} -l"
alias eee="exec ${SHELL} -l"

参考までに

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?