Escape & in music.sh correctly
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
858b7462f5
commit
dc2aabb7c9
1 changed files with 4 additions and 2 deletions
|
@ -2,7 +2,6 @@
|
|||
# music.sh
|
||||
|
||||
QUERY="$(cmus-remote -Q)"
|
||||
|
||||
STATUS="$(echo "$QUERY" | grep -e "status " | cut -d " " -f 2)"
|
||||
ARTIST="$(echo "$QUERY" | grep -e " artist " | cut -d " " -f 3-)"
|
||||
TITLE="$(echo "$QUERY" | grep -e " title " | cut -d " " -f 3-)"
|
||||
|
@ -13,4 +12,7 @@ if [ "$STATUS" != "playing" ]; then
|
|||
OUTPUT="Not playing"
|
||||
fi
|
||||
|
||||
echo " $OUTPUT"
|
||||
# Escaping the & character
|
||||
OUTPUT="${OUTPUT/\&/\&\;}"
|
||||
|
||||
echo -e " $OUTPUT"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue