Skip to main content
Share Your Experience: Take the 2024 Developer Survey
96 votes

How do I reload .inputrc?

You can also reload new entries from command line using bind -f ~/.inputrc. That will load the entries in .inputrc. Note that it just does a load, not a "reload" - so it doesn't reset any lines you ...
studgeek's user avatar
  • 2,425
27 votes

How do I reload .inputrc?

This worked for me bind -f ~/.inputrc https://unix.stackexchange.com/questions/153357/inputrc-file-not-sourcing-correctly/246422#246422
rofrol's user avatar
  • 1,911
18 votes

Trouble with readline library on mac

I have had exactly the same problem in my macOS computer trying to run gnuplot. In order to solve it, I tried several suggestions I found in the internet, and none of them works for me. For example ...
Víctor Duarte's user avatar
12 votes
Accepted

Mac readline - Library not loaded

I was able to resolve this by simply running brew switch readline 6.3.8
skwidbreth's user avatar
9 votes
Accepted

Tab completion for command arguments fail in Cygwin due to `.exe` extension

It turns out that there is a configuration option in Cygwin that configures Bash to not include a filename’s .exe extension when it completes the name of a command. Enabling the completion_strip_exe ...
Anthony Geoghegan's user avatar
7 votes

Mac readline - Library not loaded

Running brew upgrade gawk worked for me, as suggested by @wisbucky And that fixed the below error, upon opening a new terminal : dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline....
RafiAlhamd's user avatar
6 votes

SQLite with readline support on Ubuntu

Download the zip file containing C source code from https://www.sqlite.org/download.html (sqlite-amalgamation-nnnnnnn.zip) Unzip it to get shell.c, sqlite3.c, and the .h files. If not already ...
Rob de la Cruz's user avatar
6 votes

readline: difference between vi, vi-move, vi-command, vi-insert keymaps

TL;DR If you want the gist, skip to the heading editing-mode vi (the last one). But wait! There's a fair bit of background info that may be needed though: eg, the difference between an editing-mode ...
Tom Hale's user avatar
  • 2,470
6 votes
Accepted

Move vi mode string to end of bash prompt

You can achieve that by setting a very long mode string for cmd and insert modes, that include the other items you want in your prompt. Note that this means you won't be able to use special shortcuts ...
filbranden's user avatar
  • 1,581
5 votes
Accepted

How to make Ctrl+D detach tmux, while retaining GNU readline capabilities in Bash?

I'm not sure if I crafted the simplest possible solution. This: stty eof '^T' bind '"\C-d": "\C-x\C-t\C-x\C-d"' bind -x '"\C-x\C-t": _tmux_detach' _tmux_detach() { [ -z "$READLINE_LINE" ] && ...
Kamil Maciorowski's user avatar
5 votes

Mouse support for GNU Readline

Does that work ? It should print escaped sequences on your terminal when using the mouse echo -e "\e[?1000;1006;1015h" # Enable tracking If it works : test my script on github Details : Read my ...
Tinmarino's user avatar
  • 170
5 votes

Trouble with readline library on mac

In case it's helpful: I was encountering similar error messages and found that gnuplot depends on gawk, and the version of gawk automatically installed required an outdated version of readline. My ...
Aaron's user avatar
  • 51
4 votes

How do I determine what version of readline bash is using?

There is no generally reliable method of determining the version of a statically linked library. However, in this case, I believe you can use the value of the rl_readline_version global variable. ...
Nathaniel M. Beaver's user avatar
4 votes
Accepted

vim-tmux-navigator to use tmux prefix instead of C-[hjkl]

Yes, it's possible to remap the keybindings in order to use <C-b> (your tmux prefix) followed by [hjkl] to change panes, and \ to go to the previous pane. Note that you need to configure that ...
filbranden's user avatar
  • 1,581
3 votes

Cut region out of bash input

Turns out there is a function in the READLINE library for this, named just like the emacs equivalent, kill-region. But in order to use the key we first have to unbind it from a function defined ...
Rovanion's user avatar
  • 255
3 votes

Is there any way to save a keyboard macro in bash?

if it's the last macro defined this should work nicely... GNU Bash Handbook: Print the last keyboard macro defined in a format suitable for the inputrc file. print-last-kbd-macro ()
MCGRAW's user avatar
  • 131
3 votes

Mac readline - Library not loaded

my issue was due to my awk being linked to gawk brew unlink gawk
Scott's user avatar
  • 31
2 votes

I'm using Bash in "vi mode". What's the hotkey sequence to edit the current command line using an external editor?

How to disable edit-and-execute-command for the v key in vi\vi-command\vi-movement mode: You cannot rebind it to nop, since it will automatically be rebound (see post by unforgettableid). Instead, ...
tsorn's user avatar
  • 121
2 votes

Is there a way of using ctrl-r after typing part of command in bash?

Save four strikes: Avoid a second Ctrl-R by adding to your .bashrc (or to your .inputrc if you prefer): bind '"\er":"\C-a\C-r\C-y\C-r"' # alt-r = ctr-a ctr-r ctr-y ctr-r This will map ALT-R to CTR-...
DrBeco's user avatar
  • 2,035
2 votes

Trouble with readline library on mac

Installing tig via brew, upgraded my readline to v.8, which caused issues when I tried to use composer, running on phpbrew. dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib ...
Shean Hoxie's user avatar
2 votes
Accepted

Copy relative links to absolute links

You are looking for realpath: ls -s $(realpath /path/to/files/*) /mydata/path/ will do what you want.
Eugen Rieck's user avatar
  • 20.3k
1 vote

How to make Ctrl+D detach tmux, while retaining GNU readline capabilities in Bash?

Kamil Maciorowski's answer shows it's possible, and I thank him. Per his mention of testing if one is in a tmux to determine the ctrl-d behavior, the following seems to work as desired, so I am ...
anastrophe's user avatar
1 vote

Difference between "backward kill line" and "unix line discard"

In their current implementation, these two functions seem to do more or less the same thing, except that backward-kill-line can take a negative prefix argument, while unix-line-discard ignores the ...
charles-at-stack's user avatar
1 vote

Prevent Python from quitting on ctrl-D

In basic programs which use 'cooked' mode, such as cat, Ctrl+D is hooked at the tty layer as the eof character – it isn't sent to the process directly but generates an 'EOF' condition, causing the ...
grawity_u1686's user avatar
1 vote
Accepted

Bash vi mode: simulating Enter in binding

Of course I find a solution 5 minutes after posting the question, but after hours of searching for an answer.. I replaced \n with the literal character for enter, which is shown as^M in vim. Quote ...
hollaboi's user avatar
1 vote
Accepted

Changing terminal buffer scrolling shortcut

These keys are handled by the terminal emulator. Readline plays absolutely no role in this story. In konsole you can change the shortcuts in the profile preferences. In gnome-terminal these are ...
egmont's user avatar
  • 2,401
1 vote

Mac readline - Library not loaded

Add a symlink ln -s /usr/local/opt/readline/lib/libreadline.dylib /usr/local/opt/readline/lib/libreadline.7.dylib
zhaoyou's user avatar
  • 111
1 vote

How do I determine what version of readline bash is using?

gdb -quiet -ex 'print /x (int) rl_readline_version' -ex 'quit' bash # Outputs: $1 = 0x602 (Readline Version 6.02) This is reduced nathaniel-m-beaver answer
Tinmarino's user avatar
  • 170
1 vote
Accepted

line wrapping breaks intermittently (R, tmux, readline)

This has been fixed/improved in R 3.3.2. See the relevant part of the NEWS file and the reported bug: INSTALLATION and INCLUDED SOFTWARE: * Versions of the readline library >= 6.3 had been ...
rcs's user avatar
  • 186

Only top scored, non community-wiki answers of a minimum length are eligible