Hello, [email protected],
I am observing that the following two tput commands generate identical output.
tput el
tput cuu1 el
Is this expected and intentional? (To me it seems unexpected and surprising.)
For your convenience, here is a test script:
#! /bin/dash
run_test () {
local command="{ $1 ; } | od -t x1 | head -n 1"
local output="$( eval $command )"
printf '%-30s %s\n' "$1" "$output"
return ; }
echo "$TERM" # xterm-256color
run_test 'tput cuu1' # 1b 5b 41
run_test 'tput el' # 1b 5b 4b
run_test 'tput cuu1 el' # 1b 5b 4b
run_test 'tput cuu1 ; tput el' # 1b 5b 41 1b 5b 4b
run_test 'tput cuu 1 el' # 1b 5b 31 41 1b 5b 4b