설정하지 않은 alias 문제

oh my zsh

 

gl을 git log --all --decorate --graph --oneline 으로

alias 설정하려 하는데 Already up to date. 라는 엉뚱한 출력이 나온다.

 

문제를 ~/.zshrc에서 찾았다. zshrc에 보면

Set personal aliases, overriding those provided by oh-my-zsh libs,

위 주석 밑에 alias를 설정해야 겹쳐도 내 것이 설정되도록 한다.

참고로 나는 다음과 같이 설정했다.

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# My custom
alias github='cd ~/Documents/github'
alias gl='git log --oneline --decorate --all --graph'
alias gs='git status'

alias ll='ls -alh'
alias h2='/Users/{user}/Documents/github/JavaStudy/h2/bin/h2.sh'

 

alias 관련 command

 

alias: 설정되어 있는 alias list

which {alias}: alias 설명

type {alias}: alias 설명 2

alias {alias}: alias 설정

unalias {alias}: delete alias

 

만약 zshrc로 alias 설정했다면 다음으로 마무리하길 바란다.

source ~/.zshrc