From 712eea99e9ee1f542ec27147e175b2520a71250d Mon Sep 17 00:00:00 2001 From: merakor Date: Sat, 17 Jul 2021 21:50:07 +0000 Subject: cpt-list: add flag to make the operation quiet FossilOrigin-Name: f3ae20b2f810fa30dcea616faf392240300529f76779bb2dde07a417bda722bc --- src/cpt-list | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/cpt-list') diff --git a/src/cpt-list b/src/cpt-list index 4eb7cf6..77a9071 100755 --- a/src/cpt-list +++ b/src/cpt-list @@ -7,6 +7,7 @@ parser_definition() { "or: ${0##*/} -C pkg true-statement false-statement" msg -- '' 'Options:' flag CURRENT -c --current -- "Use the current directory as a package" + flag quiet -q -- "Make the operation quiet" param PKG -C --check label:" -C,--check PKG TRUE FALSE" -- \ "Check if PKG exists and return the string of TRUE if"\ "it exists, and the string of FALSE if it doesn't." \ @@ -23,7 +24,7 @@ if [ "$PKG" ]; then printf %s "$2" fi else -[ "$CURRENT" ] && set -- "${PWD##*/}" - -pkg_list "$@" + [ "$CURRENT" ] && set -- "${PWD##*/}" + [ "$quiet" ] && exec >/dev/null 2>&1 + pkg_list "$@" fi -- cgit v1.2.3 From 33856aceb8ecc4b0c24cf5ad2bd1796f08cce45e Mon Sep 17 00:00:00 2001 From: merakor Date: Sat, 17 Jul 2021 21:50:47 +0000 Subject: cpt-list: update usage string FossilOrigin-Name: bf170e5e57810fd73e0d080f5aa60ac9fee5b2a083f22fed454b0283c0bc418f --- src/cpt-list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpt-list') diff --git a/src/cpt-list b/src/cpt-list index 77a9071..7cef79e 100755 --- a/src/cpt-list +++ b/src/cpt-list @@ -3,7 +3,7 @@ parser_definition() { setup REST help:usage -- \ - "usage: ${0##*/} [-c] pkg..." \ + "usage: ${0##*/} [-cq] pkg..." \ "or: ${0##*/} -C pkg true-statement false-statement" msg -- '' 'Options:' flag CURRENT -c --current -- "Use the current directory as a package" -- cgit v1.2.3 From 2d25afbdcb9d399f8bf24b7591b63aec2e457b68 Mon Sep 17 00:00:00 2001 From: merakor Date: Sat, 17 Jul 2021 21:51:24 +0000 Subject: cpt-list: add --quiet long option FossilOrigin-Name: bb65f6b97a58453a3e1831d925957c66fdae17f57f703e03679a083615ce25a7 --- src/cpt-list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cpt-list') diff --git a/src/cpt-list b/src/cpt-list index 7cef79e..fcb1f49 100755 --- a/src/cpt-list +++ b/src/cpt-list @@ -7,7 +7,7 @@ parser_definition() { "or: ${0##*/} -C pkg true-statement false-statement" msg -- '' 'Options:' flag CURRENT -c --current -- "Use the current directory as a package" - flag quiet -q -- "Make the operation quiet" + flag quiet -q --quiet -- "Make the operation quiet" param PKG -C --check label:" -C,--check PKG TRUE FALSE" -- \ "Check if PKG exists and return the string of TRUE if"\ "it exists, and the string of FALSE if it doesn't." \ -- cgit v1.2.3