diff --git a/.config/bash/module/File.sh b/.config/bash/module/File.sh index cb08675..c0a8d86 100644 --- a/.config/bash/module/File.sh +++ b/.config/bash/module/File.sh @@ -4,8 +4,11 @@ function o() { xdg-open "${@}" } -# Play media file from CLI. -# Usage: play +# Play media file from CLI. All files by default. +# Usage: play [FILE] function play() { - flatpak run io.mpv.Mpv --no-audio-display ${*} + local targets=${*} + [[ "${targets}" = "" ]] && targets=$(_ls_file) + + flatpak run io.mpv.Mpv --no-audio-display ${targets} } diff --git a/.doc/Bash.md b/.doc/Bash.md index 24cf580..a029257 100644 --- a/.doc/Bash.md +++ b/.doc/Bash.md @@ -150,7 +150,7 @@ Command|Description Command|Description ---|--- `o `|Open file/dir in GUI. -`play `|Play media file from CLI. +`play [FILE]`|Play media file from CLI. All files by default. ## Find.