complete_word - sob - simple output bar
(HTM) git clone git://git.codemadness.org/sob
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
complete_word (376B)
---
1 #!/bin/sh
2
3 file="$OUTFILE"
4 test -f "$file" || exit 1
5
6 grepword() {
7 grep -E "^$1" < "$file"
8 }
9
10 word="$SOBWRITE"
11
12 #if test x"$DISPLAY" = x""; then
13 # line=$(grepword "$word" | sort | uniq | slmenu -l 20)
14 #else
15 # line=$(grepword "$word" | sort | uniq | dmenu -l 20)
16 #fi
17
18 line=$(grepword "$word" | sort | uniq | dmenu -l 20)
19
20 if test x"$line" != x""; then
21 printf '%s' "$line"
22 fi