public
Created — forked from timcowlishaw/gist:2767427

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env bash
COMMAND_NAME=`basename $0`
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PATH="$(echo $PATH | sed s#`echo $DIR | sed 's#\\/#\\\\\\/#g'`:##g)"
COMMAND="$(which $COMMAND_NAME)"
if command -v urxvt > /dev/null 2>&1; then
urxvt -name $COMMAND_NAME -e $COMMAND "$@" & disown -h
else
$COMMAND "$@"
fi

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.