|
@@ -7,7 +7,7 @@ ffoo import ini
|
7
|
7
|
FFOO_INI_PATH="__FFOO_INI_PATH__"
|
8
|
8
|
|
9
|
9
|
usage() {
|
10
|
|
- usage_is "[-l|--lines NUM] [-s|--split CHAR]"
|
|
10
|
+ usage_is "[-l|--lines NUM] [--split CHAR] ARGS..."
|
11
|
11
|
}
|
12
|
12
|
|
13
|
13
|
numbered=false
|
|
@@ -15,10 +15,10 @@ lines=10
|
15
|
15
|
maybe_split=cat
|
16
|
16
|
|
17
|
17
|
while true; do case $1 in
|
18
|
|
- -l|--lines) lines=$2; shift 2 ;;
|
19
|
|
- -s|--split) delim=$2; shift 2 ;;
|
20
|
|
- "") break ;;
|
21
|
|
- *) usage
|
|
18
|
+ -l|--lines) lines=$2; shift 2 ;;
|
|
19
|
+ --split) delim=$2; shift 2 ;;
|
|
20
|
+ --help|--usage) usage ;;
|
|
21
|
+ *) break ;;
|
22
|
22
|
esac done
|
23
|
23
|
|
24
|
24
|
test -n "$delim" && maybe_split=do_split
|
|
@@ -41,5 +41,4 @@ do_split() {
|
41
|
41
|
cut -d$delim -f2-
|
42
|
42
|
}
|
43
|
43
|
|
44
|
|
-dmenu -l $lines $style \
|
45
|
|
- | $maybe_split
|
|
44
|
+dmenu -l $lines $style "$@" | $maybe_split
|