File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- version_number=" 4.9.7 "
3+ version_number=" 4.9.8 "
44
55# UI
66
@@ -23,7 +23,14 @@ nth() {
2323 multi_flag=" "
2424 [ $# -ne 1 ] && shift && multi_flag=" $1 "
2525 line=$( printf " %s" " $stdin " | cut -f1,3 | tr ' \t' ' ' | launcher " $multi_flag " " $prompt " | cut -d " " -f 1)
26- [ -n " $line " ] && printf " %s" " $stdin " | grep -E ' ^' " ${line} " ' ($|[[:space:]])' | cut -f2,3 || exit 1
26+ line_start=$( printf " %s" " $line " | head -n1)
27+ line_end=$( printf " %s" " $line " | tail -n1)
28+ [ -n " $line " ] || exit 1
29+ if [ -z " $multi_flag " ]; then
30+ printf " %s" " $stdin " | grep -E ' ^' " ${line} " ' ($|[[:space:]])' | cut -f2,3 || exit 1
31+ else
32+ printf " %s" " $stdin " | sed -n ' /^' " ${line_start} " ' $/,/^' " ${line_end} $" ' /p' || exit 1
33+ fi
2734}
2835
2936die () {
You can’t perform that action at this time.
0 commit comments