summaryrefslogtreecommitdiff
path: root/home-config/fish/functions/_fzf_configure_bindings_help.fish
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2024-04-05 11:57:45 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2024-04-05 11:57:45 -0400
commitb88d77fb2d0d5028a6f5670695dee6bec129501f (patch)
tree2536b0461d297e647cf07157641c9b1223339adf /home-config/fish/functions/_fzf_configure_bindings_help.fish
parent776a7ca55d2d2c3f396de91db1c6c3c5065012cd (diff)
ahhh sloppy fish, still needs fixing, esp with the vars
Diffstat (limited to 'home-config/fish/functions/_fzf_configure_bindings_help.fish')
-rw-r--r--home-config/fish/functions/_fzf_configure_bindings_help.fish43
1 files changed, 43 insertions, 0 deletions
diff --git a/home-config/fish/functions/_fzf_configure_bindings_help.fish b/home-config/fish/functions/_fzf_configure_bindings_help.fish
new file mode 100644
index 0000000..ecfe68e
--- /dev/null
+++ b/home-config/fish/functions/_fzf_configure_bindings_help.fish
@@ -0,0 +1,43 @@
1function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings."
2 echo "\
3USAGE:
4 fzf_configure_bindings [--COMMAND=[KEY_SEQUENCE]...]
5
6DESCRIPTION
7 fzf_configure_bindings installs key bindings for fzf.fish's commands and erases any bindings it
8 previously installed. It installs bindings for both default and insert modes. fzf.fish executes
9 it without options on fish startup to install the out-of-the-box key bindings.
10
11 By default, commands are bound to a mnemonic key sequence, shown below. Each command's binding
12 can be configured using a namesake corresponding option:
13 COMMAND | DEFAULT KEY SEQUENCE | CORRESPONDING OPTION
14 Search Directory | Ctrl+Alt+F (F for file) | --directory
15 Search Git Log | Ctrl+Alt+L (L for log) | --git_log
16 Search Git Status | Ctrl+Alt+S (S for status) | --git_status
17 Search History | Ctrl+R (R for reverse) | --history
18 Search Processes | Ctrl+Alt+P (P for process) | --processes
19 Search Variables | Ctrl+V (V for variable) | --variables
20 Override a command's binding by specifying its corresponding option with the desired key
21 sequence. Disable a command's binding by specifying its corresponding option with no value.
22
23 Because fzf_configure_bindings erases bindings it previously installed, it can be cleanly
24 executed multiple times. Once the desired fzf_configure_bindings command has been found, add it
25 to your config.fish in order to persist the customized bindings.
26
27 In terms of validation, fzf_configure_bindings fails if passed unknown options. It expects an
28 equals sign between an option's name and value. However, it does not validate key sequences.
29
30 Pass -h or --help to print this help message and exit.
31
32EXAMPLES
33 Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V
34 \$ fzf_configure_bindings --directory=\cf --variables=\e\cv
35 Default bindings but disable Search History
36 \$ fzf_configure_bindings --history=
37 An agglomeration of different options
38 \$ fzf_configure_bindings --git_status=\cg --history=\ch --variables= --processes=
39
40SEE Also
41 To learn more about fish key bindings, see bind(1) and fish_key_reader(1).
42"
43end