Question

I found something in a .bashrc file like:

bind '"\C-j": menu-complete'
bind 'set completion-ignore-case on'

if I remove the 'bind',the result seems no different, so what's the usage of the 'bind' here?

Était-ce utile?

La solution

bind is used for readline library.

If you remove the first one, Ctrl-j will not do auto completion for you.
If you remove the second one, auto completion for file name is case-sensitive.


You can use help command to view builtin command's manual.

$ type bind
bind is a shell builtin

$ help bind
bind: bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]
    Set Readline key bindings and variables.
    ...SKIPPED...
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top