Skip to content

Commit

Permalink
Bugfix: Wrong escaping of titles in notion_rofi.sh
Browse files Browse the repository at this point in the history
Both the shell and sed is interpreting the backslash or something.
  • Loading branch information
olejorgenb committed Jan 24, 2017
1 parent 29312f6 commit 54dbcff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/scripts/notion_rofi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
# rofi -show notion -modi "notion:'./notion_rofi.sh focuslist'" -scroll-method 1

function escape {
sed "s/'/\\'/g"
sed "s/'/\\\'/g"
}

MENU_NAME=$1

if [[ -z $2 ]]; then
# No argument -> generate menu entries

# Unfortunately there's no good way getting pure stdout from notionflux?
# Massage the format of the return string into a usable list.

notionflux -e "return rofi.menu_list('$MENU_NAME')" \
| sed -e 's/\\"/"/g' -e 's/^"//' -e 's/\\$//g' -e '$d'
else
Expand Down

0 comments on commit 54dbcff

Please sign in to comment.