diff --git a/_wgetpaste b/_wgetpaste index c4703e5..63696ad 100644 --- a/_wgetpaste +++ b/_wgetpaste @@ -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]' \ diff --git a/wgetpaste b/wgetpaste index 1e3ae35..e38f9e5 100755 --- a/wgetpaste +++ b/wgetpaste @@ -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) @@ -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 @@ -841,6 +842,9 @@ while [[ -n $1 ]]; do -N | --no-ansi ) NOANSI=0 ;; + -q | --quiet) + QUIET=0 + ;; -r | --raw ) RAW=0 ;;