#!/bin/sh

# Run a command, but exec a shell to allow interaction afterwards
# raison'de tre:
# $ rxvt -e run.sh nget -blah
# 
# Note that the following idiom is nearly equivalent, but issuess arise in
# quoting:
# $ rxvt -e sh -c 'command args; exec $SHELL'
#
# This idiom works entirely, but is a bit more abstruse:
# $ rxvt -e sh -c 'command "$@"; exec $SHELL' command-name-for-$0 args ...
#
# See openrun for an example of its use:
# $ rxvt -e sh -c $1' "$@"; exec $SHELL' "$@"

if [ $# -eq 0 ]; then
    echo "Usage: $0 command args ..."
    exit 2
fi

"$@"
exec $SHELL

