A literal backslash in a sed command needs to be escaped using a double
backslash. Furthermore, a backslash in literal text in scdoc needs to
also be escaped. In consequence, a literal backlash in a sed command in
scdoc needs to be written as 4 backslashes.
Signed-off-by: Lukas Schmelting <lschmelting@posteo.com>
---
doc/senpai.5.scd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/senpai.5.scd b/doc/senpai.5.scd
index 42a2375..ff54c7f 100644
--- a/doc/senpai.5.scd+++ b/doc/senpai.5.scd
@@ -249,7 +249,7 @@ And the highlight file (*~/.config/senpai/highlight*):
#!/bin/sh
escape() {
- printf "%s" "$1" | sed 's#\\#\\\\#g'+ printf "%s" "$1" | sed 's#\\\\#\\\\\\\\#g'}
FOCUS=$(swaymsg -t get_tree | jq '..|objects|select(.focused==true)|.name' | grep senpai | wc -l)
if [ "$HERE" -eq 0 ] || [ $FOCUS -eq 0 ]; then
--
2.47.1