-
-
Save guidocella/a272b6e68f9c44532b011f6596e95c61 to your computer and use it in GitHub Desktop.
I had to replace '\t' by $'\t'. Otherwise, it worked like a charm. Thank you :-)
It seems that '\t' works in dash but not in bash and $'\t' works in bash but not in dash. I just restored the literal tab.
Edit: actually I also have sh linked to bash and it worked fine until now so it is sqlite3 that can interpret \t. What sh are you using to have it break?
Maybe this?
...
tab_char="\t"
sqlite3 -separator "$tab_char" "file:${1:-$HOME/.local/share/qutebrowser}/webengine/Cookies?nolock=1" "
...
Also, could this be rendered as a qutebrowser userscript?
It should run fine as a userscript. You can even use $QUTE_DATA_DIR
.
@guidocella : I just saw your question from last year...
I don't remember what version of bash/dash/sh I had, but the current gist now works for me :-)
Although, I replaced the file path with "file:${XDG_DATA_HOME}/qutebrowser/webengine/Cookies?nolock=1"
I did not bother making something that is compatible with "file:${1:-$HOME/.local/share/qutebrowser}/webengine/Cookies?nolock=1"
I believe that this would work ${1:-${XDG_DATA_HOME:-$HOME/.local/share}/qutebrowser}
but that is difficult to understand :-)
I had to replace '\t' by $'\t'. Otherwise, it worked like a charm. Thank you :-)