dotfiles/.config/shell/rc.d/base-aliases.sh
Marty Oehme 34f7cd7da9 Add zhfind command
Can be used to fuzzy search through shell history.
2019-06-07 11:39:38 +02:00

34 lines
962 B
Bash

# Prettify ls commands
if [[ "$(uname -s)" == "Linux" ]]; then
# we're on linux
alias l-d="ls -lFad"
alias l="ls -lAhF" # Overwritten for k in -aliasing-k
alias ll="ls -lFa | TERM=vt100 less"
alias ls='ls --color=auto'
fi
# Show the top 5 commands used in recent history
alias zhtop="history | awk '{a[\$2]++} END{for(i in a){printf \"%5d\t%s\n\",a[i],i}}' | sort -rn | head"
# Display timestamped recent command history
alias zh="fc -l -d -D"
# Display fuzzy-searchable history
alias zhfind="history | tac | fzf -l 20"
# 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/
alias ...="cd ../.."
alias ~="cd ~"
# make v call vim
alias v="vim"
# short, consise, clear my screen
alias cl="clear"
# let me exit out of the shell same way as vim
# TODO integrate session management with w?
alias ":q"="exit"
alias ":wq"="exit"