LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Command line horizontal scroll. (https://www.linuxquestions.org/questions/slackware-14/command-line-horizontal-scroll-4175485580/)

stf92 11-22-2013 08:43 PM

Command line horizontal scroll.
 
Hi: At present when I type in the command line interface (text consoles) horizontal scroll takes effect. I'd like to return to the old style. Can this be done with little work?

EDIT: I found the horizontal-scroll variable in the bash manual, and there I see its default value is Off. How could it set itself On is a thing I do not understand.

This is my inputrc file:
Code:

semoi@server:~$ cat /etc/inputrc
# /etc/inputrc
# This file configures keyboard input for programs using readline.
# See "man 3 readline" for more examples.

# Configure the system bell.  Options are none, visible, and audible.
set bell-style none
set horizontal-scroll-mode Off

# Enable 8 bit input.
set meta-flag On
set input-meta On
set convert-meta Off
set output-meta On

# Set various nice escape sequences:
"\eOd": backward-word
"\eOc": forward-word

# for linux console
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[3~": delete-char
"\e[2~": quoted-insert

# for xterm
"\eOH": beginning-of-line
"\eOF": end-of-line

# for freebsd console
"\e[H": beginning-of-line
"\e[F": end-of-line

# Modificacion mia:
semoi@server:~$

I have INPUTRC==/etc/inputrc. Furthermore, by varying the file contents I see it's being executed. But the line 'set horizontal-scroll-mode Off' has no effect. I'm still in horizontal scroll mode in the text console.

Didier Spaier 11-22-2013 11:40 PM

Off is the default, so it does not have to be in /etc/inputrc. That works here and
Code:

bash-4.2# echo $INPUTRC
/etc/inputrc
bash-4.2#

If I write
Code:

set horizontal-scroll-mode On
in /etc/inputrc I get horizontal scrolling running this very sophisticated script:
Code:

#!/bin/bash
echo -n "Escriba una línea de texto largo: "
read -e line


stf92 11-23-2013 03:27 AM

Very delicate the detail of using my tongue in the script, Didier. Thanks. /etc/inputrc without any line referencing scroll mode leaves the system in horizontal scroll mode, contrary to the stated default value for that variable in the bash manual. /etc/inputrc with the line 'set horizontal-scroll-mode Off' in it, has exactly the same effect. I do not know, then, how to remove horizontal scrolling behavior, cause that is the current behavior in the system, in my case! When the system has just been booted, the cli is in horizontal scroll mode that is, there is no wrap around when the cursor reaches column 80, assuming 80-column wide display.

Didier Spaier 11-23-2013 03:41 AM

according to "man 3 readline"
Code:

INITIALIZATION FILE
      Readline is customized by putting commands in an initialization file (the inputrc file).  The name of this file
      is taken from the value of the INPUTRC environment variable.  If  that  variable  is  unset,  the  default  is
      ~/.inputrc.  If that file  does not exist or cannot be read, the ultimate default is /etc/inputrc.

So:
  • What is output of "echo $INPUTRC"?
  • Do you have an ~/.inputrc file, and if yes what does it content?

stf92 11-23-2013 04:50 AM

Code:

semoi@server:~$ echo $INPUTRC
/etc/inputrc
semoi@server:~$ ls ~/.inputrc
/bin/ls: cannot access /home/semoi/.inputrc: No such file or directory
semoi@server:~$


stf92 11-23-2013 01:13 PM

I beg your pardon: /etc/inputrc reads as posted in post #1, with an exception: I removed the line that sets the horizontal scroll mode at the beginning.

I made some tests, including renaming /etc/inputrc, exiting the shell (bash) and logging in again, with no positive results. I had already read the readline manual before you quoted it and the bash manual section entitled READLINE. Now, a new issue aroused, this being of basic importance, for which I'll issue a separate thread. Maybe it is related to the scroll issue.


All times are GMT -5. The time now is 05:23 PM.