2018-06-15 13:43:04 +00:00
|
|
|
#!/usr/bin/env zsh
|
2018-02-23 09:38:24 +00:00
|
|
|
|
2019-05-26 09:02:42 +00:00
|
|
|
# remove Oh-My-Zsh correction aliases
|
|
|
|
for cmd in cp ebuild gist heroku hpodder man mkdir mv mysql sudo; do
|
|
|
|
unalias $cmd
|
|
|
|
done
|
|
|
|
|
2019-05-01 13:33:39 +00:00
|
|
|
# this alias removes leading dollar sign (useful when copying code from Stackoverflow)
|
2018-03-09 07:45:40 +00:00
|
|
|
alias '$'=''
|
2019-05-01 13:33:39 +00:00
|
|
|
# this alias allows aliases to work with sudo
|
|
|
|
alias sudo='sudo '
|
2018-03-09 07:45:40 +00:00
|
|
|
|
2019-05-20 05:39:00 +00:00
|
|
|
alias cdd='dirs -v'
|
|
|
|
|
2018-11-15 15:08:23 +00:00
|
|
|
alias grep='grep --color=auto'
|
2019-08-25 18:45:10 +00:00
|
|
|
alias diff='diff --color=auto'
|
2019-06-15 13:39:07 +00:00
|
|
|
|
2018-11-15 15:08:23 +00:00
|
|
|
# exa is a modern replacement for ls - https://the.exa.website/
|
|
|
|
if command_exists exa; then
|
|
|
|
alias ls="exa --classify --group-directories-first"
|
|
|
|
alias lsa="${aliases[ls]} --all"
|
|
|
|
alias l="${aliases[ls]} --long --header --binary --group"
|
|
|
|
alias la="${aliases[l]} --all"
|
2019-08-25 18:45:10 +00:00
|
|
|
alias tree="${aliases[ls]} --tree"
|
2018-11-15 15:08:23 +00:00
|
|
|
else
|
|
|
|
alias ls="ls --classify --group-directories-first --color=auto"
|
|
|
|
alias lsa="${aliases[ls]} --almost-all"
|
|
|
|
alias l="${aliases[ls]} -l --human-readable"
|
|
|
|
alias la="${aliases[l]} --almost-all"
|
|
|
|
fi
|
2019-05-20 05:39:00 +00:00
|
|
|
unalias ll # remove this Oh-My-Zsh alias
|
2018-11-15 15:08:23 +00:00
|
|
|
|
|
|
|
# fd is a simple, fast and user-friendly alternative to find - https://github.com/sharkdp/fd
|
|
|
|
if command_exists fd; then
|
|
|
|
alias fda="fd --hidden --no-ignore"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# git with hub
|
|
|
|
command_exists hub && alias git="hub"
|
|
|
|
|
|
|
|
# make these utils more verbose
|
|
|
|
alias cp='cp -iv'
|
|
|
|
alias mv='mv -iv'
|
|
|
|
alias rm='rm -iv'
|
|
|
|
alias rmdir='rmdir -v'
|
|
|
|
alias chmod='chmod -v'
|
|
|
|
alias chown='chown -v'
|
2019-07-31 19:43:35 +00:00
|
|
|
alias ln='ln -iv'
|
2019-08-19 09:22:37 +00:00
|
|
|
alias mkdir='mkdir -v'
|
2018-11-15 15:08:23 +00:00
|
|
|
|
|
|
|
# print file sizes in human readable format
|
|
|
|
alias du='du -h'
|
|
|
|
alias df='df -h'
|
2019-05-29 08:36:37 +00:00
|
|
|
alias free='free -h'
|
2019-05-09 15:58:25 +00:00
|
|
|
|
|
|
|
alias apt-get="echo -e \"use 'apt' instead of 'apt-get'\nif you really want to use 'apt-get', type '"'\\\\'"apt-get'\" #"
|