Commit ID:      100515EEFE12B128AFC
CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2013/04/05 15:39:53 UTC

Modified files:
        bin/mksh       : dot.mkshrc

Log message:
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…

To generate a diff of this changeset, execute the following commands:
cvs -R rdiff -kk -upr1.78 -r1.79 src/bin/mksh/dot.mkshrc

Reply via email to