Skip to content

Instantly share code, notes, and snippets.

@pkillnine
Last active November 11, 2017 18:37
Show Gist options
  • Save pkillnine/dd42b9f615191d6551b21066638680bd to your computer and use it in GitHub Desktop.
Save pkillnine/dd42b9f615191d6551b21066638680bd to your computer and use it in GitHub Desktop.
qutebrowser userscript: "run-in-shell"
#!/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