----- Changes: zsh

+ Added oh-my-zsh custom stuff
This commit is contained in:
ziro 2020-05-21 14:00:35 +07:00
parent 24f7803f51
commit 22a6b88e14
12 changed files with 54 additions and 77 deletions

View file

@ -17,10 +17,22 @@ cmd open ${{
image/*) feh -g 1280x720 --scale-down "$f" &;;
video/*) mpv "$f" --quiet > /dev/null & ;;
application/pdf) zathura "$f" & ;;
*) xdg-open "$f" ;;
*) xdg-open "$f" &;;
esac
}}
cmd extract ${{
case $f in
*.bz2) tar -xjvf $f ;;
*.gz) tar -xvf $f ;;
*.xz) tar -xf $f ;;
*.tar) tar -xvf $f ;;
*.7z|*.zip) 7z x $f ;;
*.rar) unrar x $f ;;
*) echo "File type not supported" ;;
esac
}}
cmd open_with $[ -z "$1" ] && echo "$f" || $1 "$f"
cmd mkdir $mkdir -p "$(echo $* | tr ' ' '\ ')"