/bin/sh vi mode command line editing and the period

no at spam at mgedv.net nospam at mgedv.net
Wed Aug 29 05:10:07 PDT 2007


>I wasn't able to reproduce what you explained...maybe I missed something?
> 

i just do the following:

clear
/bin/sh
EDITOR=vi
export EDITOR
set -o $EDITOR
echo 1
echo 2
echo 3
echo 4
<ESC-.>

and this is the output:
test# /bin/sh
test# EDITOR=vi
export EDITOR
set -o $EDITOR
echo 1
echo 2
echo 3
echo 4
test# test# test# echo 1
1
test# echo 2
2
test# echo 3
3
test# echo 4
4
test#
test#
test# echo 2
2
test# echo 3
3
test# echo 4
4
test#
test#


interestingly, echo 1 is not re-executed but the other commands are.
dunno what's going on here, but i really find it somewhat dangerous
as a default root shell for a unix system (of course, in vi mode)



More information about the freebsd-questions mailing list