Update bash aliases

master
Hektor Misplon 2021-12-31 12:43:26 +01:00
parent 5cd6530419
commit 97c19190a9
1 changed files with 36 additions and 22 deletions

View File

@ -1,3 +1,5 @@
# Config quick-open
alias bashrc="vim ~/.bashrc" alias bashrc="vim ~/.bashrc"
alias aliasrc="vim ~/.aliasrc" alias aliasrc="vim ~/.aliasrc"
alias vimrc="vim ~/.vimrc" alias vimrc="vim ~/.vimrc"
@ -9,9 +11,12 @@ alias .2="cd ../.."
alias .3="cd ../../.." alias .3="cd ../../.."
# Colorize output # Colorize output
alias ls="ls --color=auto" alias ls="ls --color=auto"
alias grep="grep --color=auto" alias grep="grep --color=auto"
alias ip='ip --color' alias ip="ip --color"
# Listing
alias l="ls -1" alias l="ls -1"
alias ll="ls -lh" alias ll="ls -lh"
@ -21,37 +26,46 @@ alias lta="ls -lhat"
alias ld="ls -d */" # list directories alias ld="ls -d */" # list directories
# Safety # Safety
alias rm='rm -I --preserve-root'
alias mv='mv -iv'
alias cp='cp -iv'
alias ln='ln -i'
alias mkdir='mkdir -pv'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
alias lgrep='l . | grep' alias rm="rm -I --preserve-root"
alias lagrep='la . | grep' alias mv="mv -iv"
alias cp="cp -iv"
alias ln="ln -i"
alias mkdir="mkdir -pv"
alias chown="chown --preserve-root"
alias chmod="chmod --preserve-root"
alias chgrp="chgrp --preserve-root"
# Pretty print path variables
alias path='echo -e ${PATH//:/\\n}'
# Clipboard # Clipboard
alias df='df -kTh'
alias clip='xclip -sel clip' alias clip='xclip -sel clip'
alias srclip='clip -o | speedread -w 500'
# Other
alias df='df -kTh'
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables
alias cfg='/usr/bin/git --git-dir=/home/h/.cfg/ --work-tree=/home/h'
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S" alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
alias zzz='systemctl suspend && exit'
alias o='xdg-open'
alias now='date +"%T"'
alias week='date +%V'
# Programs
alias g='git'
alias lm='xbacklight -set'
alias vi='vim' alias vi='vim'
alias py='python' alias py='python'
alias r5rs-repl='plt-r5rs --no-prim' alias r5rs-repl='plt-r5rs --no-prim'
alias cfg='/usr/bin/git --git-dir=/home/h/.cfg/ --work-tree=/home/h' alias feh="feh -B black --scale-down --auto-zoom"
alias tlmgr='/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode'
alias lm='xbacklight -set' reboot_to_windows ()
alias bat='check-battery-level' {
alias now='date "+%I:%M %a %d %b"' windows_title=$(grep -i windows /boot/grub/grub.cfg | cut -d "'" -f 2)
alias spot='ncspot' sudo grub-reboot "$windows_title" && sudo reboot
alias todo='todoist' }
alias weather='curl wttr.in' alias reboot-to-windows='reboot_to_windows'
alias zzz='systemctl suspend && exit'