Skip to content

Commit

Permalink
Added --quiet flag
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Rogalski <[email protected]>
Closes: #19
  • Loading branch information
Richard-Rogalski authored and Cogitri committed Nov 10, 2023
1 parent a1c0782 commit fa0bd6d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions _wgetpaste
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ _arguments -s : \
'(--xclippaste -C)'{--xclippaste,-C}'[write resulting url to the X clipboard selection buffer]' \
'(--raw -r)'{--raw,-r}'[show url for the raw paste]' \
'(--tee -t)'{--tee,-t}'[use tee to show what is being pasted]' \
'(--quiet -q)'{--quiet,-q}'[show the url only]' \
'(--verbose -v)'{--verbose,-v}'[show wget stderr output if no url is received]' \
'--debug[be very verbose]' \
'(--help -h)'{--help,-h}'[show help and exit]' \
Expand Down
6 changes: 5 additions & 1 deletion wgetpaste
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ Options:
-r, --raw show url for the raw paste (no syntax highlighting or html)
-t, --tee use tee to show what is being pasted
-q, --quiet show the url only
-v, --verbose show wget stderr output if no url is received
--completions emit output suitable for shell completions (only affects --list-*)
--debug be *very* verbose (implies -v)
Expand Down Expand Up @@ -659,7 +660,7 @@ showexpirations() {
}

showurl() {
echo -n "Your ${2}paste can be seen here: " >&2
[[ $QUIET ]] || echo -n "Your ${2}paste can be seen here: " >&2
echo "$1"
[[ $XPASTE ]] && x_paste "$1" primary
[[ $XCLIPPASTE ]] && x_paste "$1" clipboard
Expand Down Expand Up @@ -841,6 +842,9 @@ while [[ -n $1 ]]; do
-N | --no-ansi )
NOANSI=0
;;
-q | --quiet)
QUIET=0
;;
-r | --raw )
RAW=0
;;
Expand Down

0 comments on commit fa0bd6d

Please sign in to comment.