aliases: cleanup

feature/improve-speed
bretello 2021-10-02 13:22:44 +02:00
parent ea6dbc555e
commit 97b49b34c8
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 15 additions and 26 deletions

View File

@ -6,21 +6,21 @@
#### Easier life (MAC SPECIFIC)
####
if [[ "$(uname)" == "Darwin" ]]; then
alias o="open"
alias ls="ls -G"
## Colorize system.log contents (with grc), and inspect with less.
alias console="grc cat /var/log/system.log | sort -r | less -R"
alias o="open"
alias ls="ls -G"
## Colorize system.log contents (with grc), and inspect with less.
alias console="grc cat /var/log/system.log | sort -r | less -R"
## Quicklook shortcut
alias quicklook='qlmanage -px 2>/dev/null'
alias ql='quicklook'
## Quicklook shortcut
alias quicklook='qlmanage -px 2>/dev/null'
alias ql='quicklook'
## Airport command line interface
alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport'
## Airport command line interface
alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport'
## Flush dns cache
#alias dnsflushcache='sudo discoveryutil mdnsflushcache' # used to work until 10.6
alias dnsflushcache='sudo killall -HUP mDNSResponder' # Works up until 10.9 and after 10.10.4
## Flush dns cache
#alias dnsflushcache='sudo discoveryutil mdnsflushcache' # used to work until 10.6
alias dnsflushcache='sudo killall -HUP mDNSResponder' # Works up until 10.9 and after 10.10.4
alias lsrt='ls -G -lrt | tail -5'
else
alias ls='ls --color'
@ -65,17 +65,6 @@ alias gl5='git log -n 5'
alias pvim='poetry run vim'
# grc: try to source the definitions file in /etc/grc.zsh (print a warning if it does not exist)
if [[ -f /etc/grc.zsh ]] ; then
source /etc/grc.zsh
elif [[ -f /usr/local/etc/grc.zsh ]] ; then
source /usr/local/etc/grc.zsh
else
echo "Could not grc completion file (checked /etc/grc.zsh and /usr/local/etc/grc.zsh. Command colorization will not work. Check your grc configuration (is grc installed?)" 1>&2
fi
alias powerline_update="pip install --upgrade --user 'git+https://github.com/powerline/powerline.git@develop#powerline'"
alias gs='git status'
alias gcf='git commit --fixup=HEAD'
alias gcaf='git commit -a --fixup=HEAD'
@ -94,14 +83,14 @@ alias venv='source .venv/bin/activate'
# Run fzf with file preview
alias pf="fzf --preview='BAT_STYLE='header,changes' bat --color=always {}' --bind shift-up:preview-page-up,shift-down:preview-page-down"
alias fgitlog="git log --oneline | fzf --multi --preview 'git -p show --color=always {+1}"
alias fgitlog="git log --oneline | fzf --multi --preview 'git -p show --color=always {+1}'"
# dotfiles user aliases
if [[ -f ~/.dotfiles_aliases ]]; then
source $HOME/.dotfiles_aliases
source $HOME/.dotfiles_aliases
fi
# source ssh aliases
if [[ -f $HOME/.ssh_aliases ]]; then
if [[ -f $HOME/.ssh_aliases ]]; then
source $HOME/.ssh_aliases
fi