summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xxsh6
1 files changed, 2 insertions, 4 deletions
diff --git a/xsh b/xsh
index 1391640..3fa48e9 100755
--- a/xsh
+++ b/xsh
@@ -44,6 +44,8 @@ while [ $# -gt 0 ]; do
shift
done
+[ $# -gt 0 ] || set -- /bin/bash
+
# Split program name from its options
if [ $# -gt 0 ]; then
prg_base=$1
@@ -56,10 +58,6 @@ if [ "$V" = 1 ]; then
prg_opts="$prg_opts; sleep 4"
fi
-if [ -z "$prg_base" ]; then
- prg_base='/bin/bash'
-fi
-
prg="$prg_base $prg_opts"
prg_su="echo -n 'Changing to root...: '; su -c \"cd; $prg\""
prg_sudo="sudo -i -- $prg"