@@ -49,15 +49,19 @@ die() {
4949# https://unix.stackexchange.com/questions/299067
5050[ -t 2 ] && readonly columns=$( stty size | awk ' {print $2}' )
5151printResponsiveMessage () {
52- [ -t 2 ] || return 0
52+ if ! $show_responsive || [ ! -t 2 ]; then
53+ return
54+ fi
5355
5456 local message=" $* "
5557 # http://www.linuxforums.org/forum/red-hat-fedora-linux/142825-how-truncate-string-bash-script.html
5658 echo -n " $clear_line ${message: 0: columns} " >&2
5759}
5860
5961clearResponsiveMessage () {
60- [ -t 2 ] || return 0
62+ if ! $show_responsive || [ ! -t 2 ]; then
63+ return
64+ fi
6165
6266 echo -n " $clear_line " >&2
6367}
@@ -102,6 +106,7 @@ Output control:
102106 -a, --absolute-path always print absolute path of jar file
103107 -s, --separator specify the separator between jar file and zip entry.
104108 default is \` !'.
109+ -R, --no-find-progress do not display responsive find progress
105110
106111Miscellaneous:
107112 -h, --help display this help and exit
@@ -121,6 +126,7 @@ declare -a args=()
121126separator=' !'
122127regex_mode=-E
123128use_absolute_path=false
129+ show_responsive=true
124130
125131while (( $# > 0 )) ; do
126132 case " $1 " in
@@ -132,11 +138,6 @@ while (($# > 0)); do
132138 extensions=(${extensions[@]: +" ${extensions[@]} " } " $2 " )
133139 shift 2
134140 ;;
135- # support the typo option --seperator for compatibility
136- -s | --separator | --seperator)
137- separator=" $2 "
138- shift 2
139- ;;
140141 -E | --extended-regexp)
141142 regex_mode=-E
142143 shift
@@ -161,6 +162,15 @@ while (($# > 0)); do
161162 use_absolute_path=true
162163 shift
163164 ;;
165+ # support the typo option name --seperator for compatibility
166+ -s | --separator | --seperator)
167+ separator=" $2 "
168+ shift 2
169+ ;;
170+ -R | --no-find-progress)
171+ show_responsive=false
172+ shift
173+ ;;
164174 -h | --help)
165175 usage
166176 ;;
0 commit comments