summaryrefslogtreecommitdiff
path: root/home/xyz/.local/bin/mvln
AgeCommit message (Expand)Author
2021-11-04mvln, mv file then ln backxyz
pan> # https://github.com/kfish/xsel/issues/43 # using `>&-` or `2>&-` doesn't completely close mpv's output when run sth. like `o mpv file.mkv` # base on above observations, I choose to use `>/dev/null 2>&1` instead # need ; before } when it is in the same line as { ? https://www.shellcheck.net/wiki/SC1056 if [ $# -eq 1 ] && [ -e "$1" ] && { ! [ -x "$1" ] || [ -d "$1" ];}; then case "$1" in # libreoffice, please don't let firefox eat your shit *.docx|*.pptx) cmd=libreoffice;; *) cmd=xdg-open;; esac nohup "$cmd" "$1" 0<&- >/dev/null 2>&1 & else nohup "$@" 0<&- >/dev/null 2>&1 & fi