File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -168,10 +168,10 @@ function canonicalize {
168
168
echo " $result "
169
169
}
170
170
171
- while [[ " ${1 : 0 : 1} " = " - " || " $1 " =~ ^ \+ ([0-9]+)$ ]]; do
171
+ while [[ " $1 " ! = " " ]]; do
172
172
case $1 in
173
173
-)
174
- break
174
+ filepaths+=( " - " )
175
175
;;
176
176
--)
177
177
shift
@@ -220,12 +220,16 @@ while [[ "${1:0:1}" = "-" || "$1" =~ ^\+([0-9]+)$ ]]; do
220
220
showusage
221
221
exit 0
222
222
;;
223
- +[0-9]* )
223
+ +[0-9][0-9] * )
224
224
selections+=(${1: 1} )
225
225
;;
226
226
* )
227
- showusage
228
- exit 1
227
+ if [[ " ${1: 0: 1} " = " -" ]]; then
228
+ showusage
229
+ exit 1
230
+ else
231
+ filepaths+=(" $1 " )
232
+ fi
229
233
;;
230
234
esac
231
235
@@ -236,7 +240,7 @@ if [[ "$host" = "auto" && "$SSH_CONNECTION" != "" ]]; then
236
240
host=${SSH_CONNECTION%% * }
237
241
fi
238
242
239
- filepaths=(" $@ " )
243
+ filepaths=(" ${filepaths[@]} " " $ @" )
240
244
241
245
if [ " ${filepaths[*]} " = " " ]; then
242
246
if [[ $nowait = false ]]; then
You can’t perform that action at this time.
0 commit comments