'--stdout' now takes arguments

This commit is contained in:
Dylan 2016-02-06 00:50:45 +11:00
parent 456c706f1d
commit 8e6a548f63
1 changed files with 22 additions and 1 deletions

23
fetch
View File

@ -2178,10 +2178,31 @@ while [ "$1" ]; do
--scrot_cmd) scrot_cmd="$2" ;; --scrot_cmd) scrot_cmd="$2" ;;
# Stdout # Stdout
--stdout) stdout="on"; image="off"; color_blocks="off" ;;
--stdout_title) stdout_title="$2" ;; --stdout_title) stdout_title="$2" ;;
--stdout_seperator) stdout_seperator="$2" ;; --stdout_seperator) stdout_seperator="$2" ;;
--stdout_subtitles) stdout_subtitles="$2" ;; --stdout_subtitles) stdout_subtitles="$2" ;;
--stdout)
stdout="on"
image="off"
color_blocks="off"
for func in "$@"; do
case "$func" in
"--stdout") continue ;;
"--"*) break ;;
*)
# Call the function
get$func 2>/dev/null
eval output="\$${func}"
# Print the output
printf "%s" "$output"
;;
esac
done
[ ! -z "$output" ] && exit
;;
# Other # Other
--config) --config)