I use hstr [1] to view, navigate, search and manage my command history, which uses the following keyboard shortcut binding:
$ bind -S
\C-r outputs \C-a hstr -- \C-j
\C-xk outputs \C-a hstr -k \C-j
I've checked the built-in help of bind command, but still don’t understand how these keyboard shortcuts work.
Any more hints will be highly appreciated.
[1] https://github.com/dvorka/hstr
Regards,
HY
You should mention that you are asking for a _bash_ specific 'bind' function. - Doesn't the bash man page explains it?
On 30.08.2021 04:09, hongy...@gmail.com wrote:
I use hstr [1] to view, navigate, search and manage my command history, which uses the following keyboard shortcut binding:
$ bind -S
\C-r outputs \C-a hstr -- \C-j
\C-xk outputs \C-a hstr -k \C-j
I've checked the built-in help of bind command, but still don’t understand how these keyboard shortcuts work.
Any more hints will be highly appreciated.
[1] https://github.com/dvorka/hstr
Regards,
HY
On Monday, August 30, 2021 at 10:33:27 AM UTC+8, Janis Papanagnou wrote:
You should mention that you are asking for a _bash_ specific 'bind'
function. - Doesn't the bash man page explains it?
Yes. There are some explanations in bash man page:
###################
$ help bind
bind: bind [-lpsvPSVX] [-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.
[...]
###################
But I've previously checked the following:
$ man bind
BIND(2) Linux Programmer's Manual BIND(2)
NAME
bind - bind a name to a socket
On 30.08.2021 04:47, hongy...@gmail.com wrote:
On Monday, August 30, 2021 at 10:33:27 AM UTC+8, Janis Papanagnou wrote:
You should mention that you are asking for a _bash_ specific 'bind'
function. - Doesn't the bash man page explains it?
Yes. There are some explanations in bash man page:
###################
$ help bind
bind: bind [-lpsvPSVX] [-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.
[...]
###################
But I've previously checked the following:
$ man bind
BIND(2) Linux Programmer's Manual BIND(2)
NAMEThis is obviously something completely different. Type
bind - bind a name to a socket
man man
to see what you find in the various man page sections. Don't expect
that you find 'bash' functions in the Unix system calls section (2)!
Janis
On Monday, August 30, 2021 at 11:32:10 AM UTC+8, Janis Papanagnou wrote:
On 30.08.2021 04:47, hongy...@gmail.com wrote:
On Monday, August 30, 2021 at 10:33:27 AM UTC+8, Janis Papanagnou wrote: >>>> You should mention that you are asking for a _bash_ specific 'bind'This is obviously something completely different. Type
function. - Doesn't the bash man page explains it?
Yes. There are some explanations in bash man page:
###################
$ help bind
bind: bind [-lpsvPSVX] [-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.
[...]
###################
But I've previously checked the following:
$ man bind
BIND(2) Linux Programmer's Manual BIND(2)
NAME
bind - bind a name to a socket
man man
to see what you find in the various man page sections. Don't expect
that you find 'bash' functions in the Unix system calls section (2)!
What do you mean by saying ``(2)! '' here?
You find (as already said) a list when calling the man page of 'man'
man man
...
The table below shows the section numbers of the manual followed by the
types of pages they contain.
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 228:11:05 |
Calls: | 6,624 |
Calls today: | 6 |
Files: | 12,171 |
Messages: | 5,318,991 |