MirBSD Korn Shell for Jehanne
Go to file
tg 1a21176cac Tonnerre Lombard’s contribution:
[17:27:44] Tonnerre: csh: alias doch sudo \!-1 bash: alias doch='sudo $(history -p !-1)' zsh: alias doch='sudo $(fc -ln -1)'
[17:28:03] mirabilos: ?
[17:28:34] Tonnerre: Na ganz einfach:
[17:28:36] Tonnerre: % ls /root
[17:28:39] Tonnerre: ls: cannot open directory /root: Permission denied
[17:28:42] Tonnerre: % doch
[17:28:45] Tonnerre: [sudo] password for tonnerre:
[17:28:49] Tonnerre: anaconda-ks.cfg  cgminer-1.6.2-1.rf.src.rpm  rpmbuild  upgrade.log  upgrade.log.syslog
[17:28:53] Tonnerre: %

This is one of two mksh variants; the other uses a tmpfile:
alias doch='sudo mksh -c "${ fc -ln -1;}"'

Both quote correctly, unlike the above.

Maybe use $MKSH instead? (Quoted or unquoted? Hm. Probably quoted.)
Input on that welcome…
2013-04-05 15:39:52 +00:00
Build.sh • let mksh “set -x” print whole TCOM trees 2013-03-24 00:56:27 +00:00
check.pl
check.t one can’t cast an unsigned int to a signed int portably either, if the value 2013-04-01 02:37:53 +00:00
dot.mkshrc Tonnerre Lombard’s contribution: 2013-04-05 15:39:52 +00:00
edit.c improve DEBUG_LEAKS handling and fix freeing some locs 2013-02-10 19:05:37 +00:00
emacsfn.h
eval.c now that funsub() is a separate function, and we don’t have the clobber 2013-03-29 17:33:07 +00:00
exec.c • let mksh “set -x” print whole TCOM trees 2013-03-24 00:56:27 +00:00
expr.c one can’t cast an unsigned int to a signed int portably either, if the value 2013-04-01 02:37:53 +00:00
funcs.c use nicer (and same as in other places!) error message for typeset 2013-03-30 15:39:36 +00:00
histrap.c
jobs.c one can’t cast an unsigned int to a signed int portably either, if the value 2013-04-01 02:37:53 +00:00
lalloc.c
lex.c also do not, ever, use &> bashiop in lksh 2013-03-29 17:33:56 +00:00
main.c now that funsub() is a separate function, and we don’t have the clobber 2013-03-29 17:33:07 +00:00
Makefile • let mksh “set -x” print whole TCOM trees 2013-03-24 00:56:27 +00:00
misc.c one can’t cast an unsigned int to a signed int portably either, if the value 2013-04-01 02:37:53 +00:00
mksh.1 RCSID sync w/ oksh; whitespace (KNF) 2013-03-24 21:34:14 +00:00
sh_flags.h
sh.h one can’t cast an unsigned int to a signed int portably either, if the value 2013-04-01 02:37:53 +00:00
shf.c make "%#s" into print_value_quoted (ignoring field width and precision), if you can get it around gcc’s __printf__ __format__ attribute that is… 2013-03-30 15:39:16 +00:00
strlcpy.c
syn.c
tree.c • let mksh “set -x” print whole TCOM trees 2013-03-24 00:56:27 +00:00
var_spec.h
var.c one can’t cast an unsigned int to a signed int portably either, if the value 2013-04-01 02:37:53 +00:00