Last active
November 11, 2017 18:37
-
-
Save pkillnine/dd42b9f615191d6551b21066638680bd to your computer and use it in GitHub Desktop.
qutebrowser userscript: "run-in-shell"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# qutebrowser userscript for executing shell commands | |
SHELL=sh | |
CMD=${@:2} | |
case $1 in | |
(--fish) SHELL=fish ;; | |
(--bash) SHELL=bash ;; | |
(*) CMD=$@ ;; | |
esac | |
echo $CMD | $SHELL | |
#echo echo $CMD \| $SHELL > /tmp/qb_shell_command.log # uncomment for debugging |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment