Skip to content

Instantly share code, notes, and snippets.

@cngkaygusuz
Last active June 26, 2016 11:23
Show Gist options
  • Save cngkaygusuz/15bbce3161bda4f6822af77a7ae0c88c to your computer and use it in GitHub Desktop.
Save cngkaygusuz/15bbce3161bda4f6822af77a7ae0c88c to your computer and use it in GitHub Desktop.
Aliases I use for various things. Meaningful with zsh.
alias cb="cd /base" # I use /base for various things. You can ignore this line.
alias edal="vim ~/.aliases" # To edit aliases.
alias gitc="git commit -m"
alias gita="git add ."
# Colored 'ls' from bash.
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# 'ls' is the pretty much the first thing afer cd. Let's automate it.
function cd {
builtin cd "$1"
ls
}
# Docker stuff
# Below two functions use bash. You may change it if you want.
function drn {
docker run -ti $1 bash
}
function dntr {
docker exec -ti $1 bash
}
# ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment