Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-22-2013, 09:43 PM
|
#1
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Rep:
|
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.
Last edited by stf92; 11-22-2013 at 11:51 PM.
|
|
|
11-23-2013, 12:40 AM
|
#2
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,302
Rep: 
|
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
|
|
|
11-23-2013, 04:27 AM
|
#3
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
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.
Last edited by stf92; 11-23-2013 at 04:32 AM.
|
|
|
11-23-2013, 04:41 AM
|
#4
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,302
Rep: 
|
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?
|
|
|
11-23-2013, 05:50 AM
|
#5
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
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:~$
|
|
|
11-23-2013, 02:13 PM
|
#6
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442
Original Poster
Rep:
|
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.
Last edited by stf92; 11-23-2013 at 02:16 PM.
|
|
|
All times are GMT -5. The time now is 09:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|