summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2023-03-05 21:37:10 -0600
committerCase Duckworth2023-03-05 21:37:10 -0600
commit746aa1743096e166341de7ec226ae0c656d47240 (patch)
treeabf551cfa3e46e7297d48824bb3afbf5180318e3
parentRemove spurious echo (diff)
downloadtwerk-746aa1743096e166341de7ec226ae0c656d47240.tar.gz
twerk-746aa1743096e166341de7ec226ae0c656d47240.zip
Display @'s better
-rwxr-xr-xtwerk21
1 files changed, 21 insertions, 0 deletions
diff --git a/twerk b/twerk index 163790a..02bd631 100755 --- a/twerk +++ b/twerk
@@ -174,6 +174,27 @@ format_posts() {
174 tr ' ' '\n' | 174 tr ' ' '\n' |
175 while IFS= read word 175 while IFS= read word
176 do 176 do
177 case "$word" in
178 \@\<*\>)
179 word="${word#@<}"
180 word="${word%>}"
181 word="@${word}"
182 ;;
183 \@\<*)
184 read nextword
185 case "$nextword" in
186 *\>)
187 word="${word#@<}"
188 word="@${word}"
189 ;;
190 *)
191 word="$word $nextword"
192 ;;
193 esac
194 ;;
195 esac
196
197
177 if test $(( linewidth + ${#word} )) -ge "$TWERK_WIDTH" 198 if test $(( linewidth + ${#word} )) -ge "$TWERK_WIDTH"
178 then 199 then
179 echo 200 echo