Skip to content

Commit 0513eaf

Browse files
authored
Merge pull request #2205 from seefood/ira/update-gif-plugin
2 parents 473e26e + 3334212 commit 0513eaf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

plugins/available/gif.plugin.bash

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function v2gif() {
6464
fi
6565

6666
# Parse the options
67-
args=$("$getopt" -l "alert:" -l "lossy:" -l "width:" -l del,delete -l high -l tag -l "fps:" -l webm -o "a:l:w:f:dhmt" -- "$@") || {
67+
args=$("$getopt" -l "alert:" -l "lossy:" -l "width:" -l del,delete -l high -l help -l tag -l "fps:" -l webm -o "a:l:w:f:dhmt" -- "$@") || {
6868
echo 'Terminating...' >&2
6969
return 2
7070
}
@@ -82,6 +82,7 @@ function v2gif() {
8282
local fps=""
8383
local make_webm=""
8484
local alert=5000
85+
local printhelp=""
8586
while [[ $# -ge 1 ]]; do
8687
case "$1" in
8788
--)
@@ -94,6 +95,11 @@ function v2gif() {
9495
opt_del_after="true"
9596
shift
9697
;;
98+
--help)
99+
# Print Help
100+
printhelp="true"
101+
shift
102+
;;
97103
-h | --high)
98104
#High Quality, use gifski
99105
gifski="$(type -p gifski)"
@@ -141,7 +147,7 @@ function v2gif() {
141147
esac
142148
done
143149

144-
if [[ -z "$*" ]]; then
150+
if [[ -z "$*" || "$printhelp" ]]; then
145151
echo "$(tput setaf 1)No input files given. Example: v2gif file [file...] [-w <max width (pixels)>] [-l <lossy level>] $(tput sgr 0)"
146152
echo "-d/--del/--delete Delete original vid if done suceessfully (and file not over the size limit)"
147153
echo "-h/--high High Quality - use Gifski instead of gifsicle"

0 commit comments

Comments
 (0)