GNU Readline is a library for command line edition, used by bash and some other programs

learn more… | top users | synonyms

96
votes
3answers
44k views

How to unfreeze after accidentally pressing Ctrl-S in a terminal?

It's a situation that has happened quite often to me: after I press (with a different intention) Ctrl-S in a terminal, the interaction (input or output) with it is frozen. It's probably a kind of ...
4
votes
2answers
2k views

Reading character by character with bash read

I've been trying to use bash to read a file character by character. After much trial and error, I have discovered that this works: exec 4<file.txt declare -i n while read -r ch <&4; ...
4
votes
3answers
2k views

Configure up-arrow to browse through commands with same initial characters rather than all previous commands

On the bash command-line, ↑ gives me the previous command. On the command-lines in numpy or matlab, when I type a few characters, ↑ gives me the previously entered command starting with those ...
9
votes
2answers
554 views

Alt-Left to skip words does not work in terminal emulators

On a Debian Wheezy machine at previous job, I got used to Alt+Left and Alt+Right to skip between words on active command-line (in bash). However, since at home I have upgraded to Jessie (Debian 8.0, ...
5
votes
3answers
752 views

Change $TERMINFO in bashrc script

I'm trying to set TERMINFO="$HOME/.terminfo" within my .bashrc script. The reason being is that my terminal isn't in the system terminfo location, and so I have its terminfo file in my home directory. ...
4
votes
2answers
87 views

Where does the yanked text on commadline get stored?

When you delete characters on the command line using readline commands (e.g. Ctrl-U, you can paste using Ctrl-y, but where does it get stored? It does not seem to use X11 clipboard at all.
3
votes
1answer
314 views

How race conditions affect reads and writes (that happen at the same time)

Let's say I open a file a for reading. What if an application, let's call it aWriter writes to this file in random intervals. Are there any possibilities of me receiving improper file contents if I ...