LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-22-2013, 09:43 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
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.
 
Old 11-23-2013, 12:40 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,302

Rep: Reputation: Disabled
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
 
Old 11-23-2013, 04:27 AM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
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.
 
Old 11-23-2013, 04:41 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,302

Rep: Reputation: Disabled
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?
 
Old 11-23-2013, 05:50 AM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
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:~$
 
Old 11-23-2013, 02:13 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Readline variable horizontal-scroll-mode. stf92 Slackware 3 10-21-2013 09:34 PM
Emacs: Open two files in horizontal windows from command line jhwilliams Linux - Software 4 02-06-2009 01:32 AM
Laptop scroll direction in KDE is stuck on horizontal JoeyAdams Linux - Software 2 02-22-2008 11:39 PM
How can I get horizontal scroll out of my mouse? Dngrsone Slackware 9 11-04-2006 10:23 AM
Disable horizontal scroll? mjjzf Linux - Laptop and Netbook 3 11-16-2005 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration