[Bin] Fix issue with awiki

This commit fixes an issue with awiki where selecting a page which title
contains whitespace would not open the page in the browser due to
remaining whitespace. This commit fixes it by replacing whitespace with
underscores.
This commit is contained in:
Lucien Cartier-Tilet 2021-01-02 13:22:03 +01:00
parent 182a8e62db
commit a0b258581a
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -108,7 +108,8 @@ The first step is to create the list of all the pages that are currently stored
set WLOCATION /usr/share/doc/arch-wiki/html/en/
set WPAGE (/bin/ls $WLOCATION | \
sed -e 's/_/ /g' -e 's/\.html$//' -e 's|.*/\(.*\)|\1|' | \
rofi -dmenu -p "Arch Wiki" -i | sed 's/ +/_/g')
rofi -dmenu -p "Arch Wiki" -i)
set WPAGE (echo $WPAGE | sed -r 's/\s+/_/g')
#+END_SRC
Now, all I need to do is to send this list into rofi and tell it to open the result with our favorite browser with ~xdg-open~.