LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-14-2019, 10:44 AM   #1
Lockywolf
Member
 
Registered: Jul 2007
Posts: 198

Rep: Reputation: 44
C-q not working in bash. How to debug?


Hello, everyone!

My problem is a bit strange.

I (as, I guess, many people) have a stock slackware64's default bash shell and stock /etc/inputrc.

I am trying to use the default keybinding for "quoted-insert", which is:

Code:
"\C-q": quoted-insert
However, literally typing C-q does nothing. C-q C-l refreshed the screen instead of displaying ^L.

This behaviour is reproducible in xfce4-terminal, xterm, uxterm, and C-M-F* consoles, but is NOT reproducible in any of those is using ksh. (Which doesn't use GNU Readline, as far as I know.)

C-v and the \e-sequence are working just fine. Is it that C-q is not going through Readline for some reason?
 
Old 05-14-2019, 12:14 PM   #2
philanc
Member
 
Registered: Jan 2011
Posts: 190

Rep: Reputation: 151Reputation: 151
Quote:
Originally Posted by Lockywolf View Post
However, literally typing C-q does nothing. C-q C-l refreshed the screen instead of displaying ^L.
C-q (and the companion C-s) may be used for tty flow control. C-s stops the flow and C-q restarts it.

To disable flow control, do
Code:
stty -ixon
and C-q should be available to readline. C-q C-l should then display ^L
 
Old 05-14-2019, 12:49 PM   #3
average_user
Member
 
Registered: Dec 2010
Location: Warsaw, Poland
Distribution: Slackware
Posts: 360

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by philanc View Post
C-q (and the companion C-s) may be used for tty flow control. C-s stops the flow and C-q restarts it.
Correct, see in output of stty -a:
Code:
start = ^Q
 
Old 05-14-2019, 02:34 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 8,837

Rep: Reputation: Disabled
Quote:
Originally Posted by philanc View Post
C-q (and the companion C-s) may be used for tty flow control. C-s stops the flow and C-q restarts it.
This reminds me the old days. Nearly 40 years ago I managed a project at a car plant that used dedicated phone lines to communicate between the main frame and terminals (real terminals, not virtual ones) asynchronously, using Xon (aka DC1) and Xoff (aka DC3). 1200 bauds was a good enough speed then...

Last edited by Didier Spaier; 05-14-2019 at 03:49 PM.
 
Old 05-14-2019, 03:37 PM   #5
philanc
Member
 
Registered: Jan 2011
Posts: 190

Rep: Reputation: 151Reputation: 151
Quote:
Originally Posted by Didier Spaier View Post
This reminds me the old days. Nearly 40 years ago I managed a project at a car plant that used dedicated phone lines to communicate between the main frame an terminals (real terminals, not virtual one) asynchronously, using Xon (aka DC1) and Xoff (aka DC3). 1200 bauds was a good enough speed then...
I still remember today my first ^S/^Q lesson: I was typing at a terminal, and it suddenly looked dead. Could type anything and nothing changed on the screen. I called a sysadmin (no help desk these days), asking if the computer was down. The guy sighed. "Control-Q" he said dryly, and he hanged up.
 
Old 05-14-2019, 08:43 PM   #6
Lockywolf
Member
 
Registered: Jul 2007
Posts: 198

Original Poster
Rep: Reputation: 44
Got it, thanks!

I knew that C-q resumes the flow after C-s has been pressed.

But I didn't know that C-q is also intercepted if C-s has NOT been pressed.
 
  


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
[SOLVED] Not able to debug a library compiled with debug information gregorian Programming 6 10-29-2011 09:53 AM
libc6-debug or glibc-debug fibreoptique Linux - Newbie 2 01-20-2011 07:52 AM
how debug kernel with ddd? how debug the kernel with ddd? mjalalynia Linux - Kernel 2 08-25-2008 06:50 AM
How to debug without having debug section in an executable ? unclesam Linux - Newbie 0 02-02-2006 06:23 AM
[debug]what does the following debug information mean icoming Programming 21 06-08-2004 02:13 AM

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

All times are GMT -5. The time now is 12:07 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration