mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 03:21:30 +01:00
aliases: cleanup
This commit is contained in:
parent
ea6dbc555e
commit
97b49b34c8
41
aliases.sh
41
aliases.sh
|
@ -6,21 +6,21 @@
|
||||||
#### Easier life (MAC SPECIFIC)
|
#### Easier life (MAC SPECIFIC)
|
||||||
####
|
####
|
||||||
if [[ "$(uname)" == "Darwin" ]]; then
|
if [[ "$(uname)" == "Darwin" ]]; then
|
||||||
alias o="open"
|
alias o="open"
|
||||||
alias ls="ls -G"
|
alias ls="ls -G"
|
||||||
## Colorize system.log contents (with grc), and inspect with less.
|
## Colorize system.log contents (with grc), and inspect with less.
|
||||||
alias console="grc cat /var/log/system.log | sort -r | less -R"
|
alias console="grc cat /var/log/system.log | sort -r | less -R"
|
||||||
|
|
||||||
## Quicklook shortcut
|
## Quicklook shortcut
|
||||||
alias quicklook='qlmanage -px 2>/dev/null'
|
alias quicklook='qlmanage -px 2>/dev/null'
|
||||||
alias ql='quicklook'
|
alias ql='quicklook'
|
||||||
|
|
||||||
## Airport command line interface
|
## Airport command line interface
|
||||||
alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport'
|
alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport'
|
||||||
|
|
||||||
## Flush dns cache
|
## Flush dns cache
|
||||||
#alias dnsflushcache='sudo discoveryutil mdnsflushcache' # used to work until 10.6
|
#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 dnsflushcache='sudo killall -HUP mDNSResponder' # Works up until 10.9 and after 10.10.4
|
||||||
alias lsrt='ls -G -lrt | tail -5'
|
alias lsrt='ls -G -lrt | tail -5'
|
||||||
else
|
else
|
||||||
alias ls='ls --color'
|
alias ls='ls --color'
|
||||||
|
@ -65,17 +65,6 @@ alias gl5='git log -n 5'
|
||||||
|
|
||||||
alias pvim='poetry run vim'
|
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 gs='git status'
|
||||||
alias gcf='git commit --fixup=HEAD'
|
alias gcf='git commit --fixup=HEAD'
|
||||||
alias gcaf='git commit -a --fixup=HEAD'
|
alias gcaf='git commit -a --fixup=HEAD'
|
||||||
|
@ -94,14 +83,14 @@ alias venv='source .venv/bin/activate'
|
||||||
|
|
||||||
# Run fzf with file preview
|
# 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 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
|
# dotfiles user aliases
|
||||||
if [[ -f ~/.dotfiles_aliases ]]; then
|
if [[ -f ~/.dotfiles_aliases ]]; then
|
||||||
source $HOME/.dotfiles_aliases
|
source $HOME/.dotfiles_aliases
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# source ssh aliases
|
# source ssh aliases
|
||||||
if [[ -f $HOME/.ssh_aliases ]]; then
|
if [[ -f $HOME/.ssh_aliases ]]; then
|
||||||
source $HOME/.ssh_aliases
|
source $HOME/.ssh_aliases
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user