1

For a command like this one on Linux debian-linux 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 (2018-12-22) x86_64 GNU/Linux with xfce I get :

alain@debian-linux:~$ dbus-send --system --type=method_call --print-reply --dest
=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListActivatable  
Names

The same command on OpenBSD LeOpenBSD 6.4 GENERIC.MP#364 amd64 with xfce I get :

ktop/DBus org.freedesktop.DBus.ListActivatableNames   <

On linux, at the end of screen, we go to next line.
On BSD(OpenBSD-NetBSD), the command line continue on the same line and the first words disapear.
It's the same in xfce-terminal-emulator, xterm or in TTY (Alt-Ctrl-F3)

I try to add am in gettytab in the defaut section with no avail.
Termcap man page say :
If the display wraps around to the beginning of the next line when the cursor reaches the right margin, then it should have the am capability.
What can I do ?

ctac_
  • 2,413
  • 2
  • 7
  • 17

2 Answers2

1

Short answer

If you want to your current shell without this feature

set +o emacs

If you want to spawn a new shell without this feature

ksh +o emacs

Long answer

This behavior is mainly due to the shell input interactive editing mode supported on OpenBSD.

In these editing modes, if a line is longer than the screen width (see the COLUMNS parameter), a ‘>’, ‘+’, or ‘<’ character is displayed in the last column indicating that there are more characters after, before and after, or before the current position, respectively. The line is scrolled horizontally as necessary.

If you want to remove this feature, you can use set build-in command present in sh or ksh. You can also remove this flag during invocation by using +o

Finally, if you want to check if some interactive editing modes are enabled on your current shell, you can invoke set -o or set +o without argument. It will give you something like that, here the set -o command:

$ set -o
Current option settings
allexport      off  keyword        off  notify         off  verbose        off 
braceexpand    on   login          on   nounset        off  vi             off 
bgnice         off  markdirs       off  physical       off  viraw          off 
csh-history    off  monitor        on   posix          off  vi-show8       off 
emacs          off  noclobber      off  privileged     off  vi-tabcomplete on  
errexit        off  noexec         off  restricted     off  vi-esccomplete off 
gmacs          off  noglob         off  sh             off  xtrace         off 
ignoreeof      off  nohup          on   stdin          on   
interactive    on   nolog          off  trackall       off

and here the set +o command:

$ set +o
set +o allexport -o braceexpand +o bgnice +o csh-history +o emacs +o errexit 
+o gmacs +o ignoreeof -o interactive +o keyword -o login +o markdirs -o monitor 
+o noclobber +o noexec +o noglob -o nohup +o nolog +o notify +o nounset 
+o physical +o posix +o privileged +o restricted +o sh -o stdin +o trackall 
+o verbose +o vi +o viraw +o vi-show8 -o vi-tabcomplete +o vi-esccomplete 
+o xtrace
Mathieu Kerjouan
  • 495
  • 5
  • 13
  • You can disable your editing mode for one purpose and reactive it after, your history will be available. You can also use `history` to list your history with editing mode (still available). it works pretty well on my side. ;) – Mathieu Kerjouan Jul 03 '19 at 05:02
  • 1
    Yes, I can use history or fc -... but it's not really easy. I can use ed by default or vi or ... to modify the command line. I like to use the arrow keys to navigate on the lines and I can change easily a letter, a word ... With set +o emacs, arrow keys give ^[[A ... So I must redefine the key in xterm, in terminal emulator ... I look at that for my personal knowledge but it's not easy. Perhaps you use something already defined and you can give a link. Thanks. – ctac_ Jul 03 '19 at 17:10
  • Good question... I really don't know actually how to do that! I was thinking `bind` built-in function would work as expected, but it is not the case and work only for Emacs editing mode. – Mathieu Kerjouan Jul 04 '19 at 08:31
0

I think what you're actually describing may be a difference between the two very different shells used on Linux and most BSDs and their very different command-line editing implementations.

This probably has nothing to do with differences between various terminal emulator implementations; nor with differences between terminal capabilities databases describing those terminal emulations.

On the BSD system(s) the default shell's command-line editor scrolls the whole like across the width of the screen depending on the position of the cursor. On some Linux systems I've seen the default shell's command-line editor wrap long lines around to continue on the next line.

Greg A. Woods
  • 2,663
  • 29
  • 26