dotfiles

config files and scripts
git clone git://git.hanetzok.net/dotfiles
Log | Files | Refs

aliasrc (1148B)


      1 #!/bin/sh
      2 
      3 # Use neovim for vim if present.
      4 [ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
      5 
      6 # Use $XINITRC variable if file exists.
      7 [ -f "$XINITRC" ] && alias startx="startx $XINITRC"
      8 
      9 # sudo not required for some system commands
     10 for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do
     11 	alias $command="sudo $command"
     12 done; unset command
     13 
     14 # Verbosity and settings that you pretty much just always are going to want.
     15 alias \
     16 	cp="cp -iv" \
     17 	mv="mv -iv" \
     18 	rm="rm -vI" \
     19 	bc="bc -ql" \
     20 	rsync="rsync -zrvtP" \
     21 	mkd="mkdir -pv" \
     22 
     23 # Colorize commands when possible.
     24 alias \
     25 	ls="ls -hN --color=auto --group-directories-first" \
     26 	grep="grep --color=auto" \
     27 	diff="diff --color=auto" \
     28 	ccat="highlight --out-format=ansi" \
     29 	ip="ip -color=auto" \
     30 	cat="bat"
     31 
     32 # These common commands are just too long! Abbreviate them.
     33 alias \
     34 	ka="killall" \
     35 	g="git" \
     36 	ytfzf="ytfzf -t" \
     37 	v="$EDITOR" \
     38 	vi="$EDITOR" \
     39 	p="pacman" \
     40 	z="zathura" \
     41 	dcd="docker compose down" \
     42 	dcud="docker compose up -d" \
     43 	dcp="docker compose pull" \
     44 	dcl="docker compose logs -n 100 -f" \
     45 	wd="wg-quick down wg0" \
     46 	wu="wg-quick up wg0"