X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=f07fb67a153880436a35f3a0d79d7b81c7e8b2aa;hb=ba50de94fa8728459333e95a5019d1cfbf23dd78;hp=036b4e7e89ce2f3f15761700c9f11e21c9abb03e;hpb=61d7f2c159f8b702252ff6f603eb4dd4f32295a3;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 036b4e7..f07fb67 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2953,9 +2953,17 @@ iwclient() { salias dhclient "$(wavemon -d | awk '/device/{print $2}')" } -# spawn a minimally set up ksh - useful if you want to umount /usr/. +# spawn a minimally set up mksh - useful if you want to umount /usr/. minimal-shell() { - exec env -i ENV="/etc/minimal-shellrc" HOME="$HOME" TERM="$TERM" ksh + emulate -L zsh + local shell="/bin/mksh" + + if ! check_com -c ${shell}; then + printf '`%s'\'' not available, giving up.\n' ${shell} >&2 + return 1 + fi + + exec env -i ENV="/etc/minimal-shellrc" HOME="$HOME" TERM="$TERM" ${shell} } # a wrapper for vim, that deals with title setting