2019-07-24 05:33:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2019-02-18 16:55:05 +00:00
|
|
|
# Prettify ls commands
|
2019-07-24 05:33:28 +00:00
|
|
|
if [ "$(uname -s)" = "Linux" ]; then
|
2019-02-04 02:32:45 +00:00
|
|
|
# we're on linux
|
|
|
|
alias l-d="ls -lFad"
|
2019-02-18 16:55:05 +00:00
|
|
|
alias l="ls -lAhF" # Overwritten for k in -aliasing-k
|
2019-02-04 02:32:45 +00:00
|
|
|
alias ll="ls -lFa | TERM=vt100 less"
|
|
|
|
alias ls='ls --color=auto'
|
|
|
|
fi
|
|
|
|
|
2019-02-18 16:55:05 +00:00
|
|
|
# Show the top 5 commands used in recent history
|
2019-07-24 05:33:28 +00:00
|
|
|
_zhtop() {
|
|
|
|
history | awk "{a[\$2]++} END{for(i in a){printf \"%5d\t%s\n\",a[i],i}}" | sort -rn | head
|
|
|
|
}
|
|
|
|
alias zhtop=_zhtop
|
2019-02-18 16:55:05 +00:00
|
|
|
# Display timestamped recent command history
|
2019-02-04 02:32:45 +00:00
|
|
|
alias zh="fc -l -d -D"
|
|
|
|
|
2019-02-18 16:55:05 +00:00
|
|
|
# Display your current ip address
|
|
|
|
alias myip="curl -s icanhazip.com"
|
|
|
|
|
|
|
|
# move around faster for often used cd commands
|
|
|
|
alias ..="cd .." # overwritten by enhancd config in .zshrc.d/
|
2019-02-04 02:32:45 +00:00
|
|
|
alias ...="cd ../.."
|
2019-02-04 10:55:00 +00:00
|
|
|
alias ~="cd ~"
|
2019-02-04 02:32:45 +00:00
|
|
|
|
2019-02-26 09:31:40 +00:00
|
|
|
# make v call vim
|
|
|
|
alias v="vim"
|
2019-03-07 19:36:58 +00:00
|
|
|
|
|
|
|
# short, consise, clear my screen
|
|
|
|
alias cl="clear"
|
2019-03-17 21:31:24 +00:00
|
|
|
|
|
|
|
# let me exit out of the shell same way as vim
|
|
|
|
# TODO integrate session management with w?
|
2019-07-24 05:33:28 +00:00
|
|
|
alias :q="exit"
|
|
|
|
alias :wq="exit"
|