Skip to content

Commit c1a7c43

Browse files
committed
chore(bin/ytdl-mpv): add version flag
1 parent 2e5f3fa commit c1a7c43

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/ytdl-mpv

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
# | YTDL-MPV |
55
# | |
66
# | Browse and play YouTube contents from rofi |
7-
# | using yt-dlp and mpv |
7+
# | using yt-dlp and mpv |
88
# | |
99
# | Authors: Andrea Rossoni |
1010
# | License: GPLv3 |
1111
# *--------------------------------------------*
1212

13+
# ytdl-mpv version
14+
VERSION="v0.4.0"
1315

1416
# Default functions
1517
_rofi() {
@@ -153,6 +155,7 @@ optional arguments:
153155
-l, --linen LINEN rofi vertical lines number [default ${LINEN}]
154156
-s, --socket SOCKET mpv socket path [default "${SOCKET}"]
155157
-w, --width WIDTH rofi width [default ${WIDTH}]
158+
-V, --version print ytdl-mpv version
156159
EOF
157160
}
158161

@@ -523,6 +526,7 @@ while :; do
523526
-n|--number) shift; [ -n "$1" ] && [[ $1 =~ ^[0-9]+$ ]] && NUMBER="$1";;
524527
-l|--linen) shift; [ -n "$1" ] && [[ $1 =~ ^[0-9]+$ ]] && LINEN="$1";;
525528
-h|--help) shift; _usage; exit 0;;
529+
-V|--version) shift; printf 'ytdl-mpv: %s\n' "${VERSION}"; exit 0;;
526530
-s|--socket) shift; [ -n "$1" ] && SOCKET="$1";;
527531
-w|--width) shift; [ -n "$1" ] && [[ $1 =~ ^[0-9]+$ ]] && WIDTH="$1";;
528532
*) break;;

0 commit comments

Comments
 (0)