Surprising tput behavior: `tput el` and `tput cuu1 el` generate identical output

Parke <[email protected]> Tue, 2 Jun 2026 16:21:54 -0700
Newsgroups gmane.comp.lib.ncurses.bugs
Message-ID <CAPxz1+ZJdOg=2tYwk0FFWMF1Qy350_Ygst0S7gd3LacjZsHaoQ@mail.gmail.com>
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