# Interactive: history, fc, ^R, HISTFILE. command -v python3 >/dev/null 2>&1 || exit 77 printf 'echo from-file\n' >hist PS1='$ ' ENV='' HISTFILE=$PWD/hist HISTSIZE=50 \ python3 "$TESTS/tools/ptydrive.py" "$TSH" <<'END' send \x1b[A\r expect from-file send echo one\r send echo two\r send \x1b[A\x1b[A\x1b[B\r expect two send \x12on\r expect one send \x12tw\x07echo cancelled\r expect cancelled send for i in a b\r send do echo $i\r send done\r expect b send fc -l\r expect done send fc -ln -2\r send fc -s one=uno echo\\ one\r expect uno send fc -s\r expect uno send FCEDIT=true; fc -e true echo\r expect uno send echo ' not recorded twice'\r send echo ' not recorded twice'\r send fc -l -1\r send exit\r END echo "--- saved:" tail -n 3 hist