Created
September 27, 2017 11:50
-
-
Save wildente/3c4f1db1c01541bc8489c25a92d08d7a to your computer and use it in GitHub Desktop.
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/bash | |
# | |
MYSHELL=/bin/bash | |
HISTORYFILE=/var/tmp/bashcmd.rofi.list | |
TERMINAL=/usr/bin/urxvt | |
if [[ -z "$@" ]] | |
then | |
sort ${HISTORYFILE} 2>/dev/null || echo "just issue command being executed via ${MYSHELL}" | |
else | |
grep -q "^$@$" ${HISTORYFILE} &>/dev/null || echo "$@" >> ${HISTORYFILE} | |
coproc ( ${MYSHELL} -c "$@" &> /dev/null ) | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment