chiark / gitweb /
dot/bashrc: Fix `rootly' to make a shell on demand.
[profile] / dot / bashrc
index c39392ababdea585117cc3e78637141aca732b1a..69af4a1d07af68a5d928cf69c577e3b2fd01706f 100644 (file)
@@ -98,7 +98,10 @@ alias cx='chmod a+x'
 alias which="command -v"
 alias rc="rc -l"
 alias ssync="rsync -e ssh"
-alias rootly=$__MDW_ROOTLY
+rootly () {
+  case $# in 0) set -- "${SHELL-/bin/sh}" ;; esac
+  $__MDW_ROOTLY "$@"
+}
 alias r=rootly
 alias re="rootly $EDITOR"
 alias pstree="pstree -hl"