aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_man_page.fish
diff options
context:
space:
mode:
authorGravatar Konrad Borowski <x.fix@o2.pl>2014-09-28 11:09:14 +0200
committerGravatar Konrad Borowski <x.fix@o2.pl>2014-09-28 11:12:25 +0200
commit26051ea1984ee6f6329d46eb3c001a5d2bfe1bae (patch)
treee1952aa36e7918d92f80fc053c4b09dc46909461 /share/functions/__fish_man_page.fish
parentb00cbae4b52ee3dbdef7abb064004b05e6ec9e3a (diff)
Add Meta+H as keybinding for man page.
Apparently, in zsh, Meta+H can be used to display the manpage for the current command. This commit adds this zsh feature to fish shell. The F1 keybinding is left, although it's now secondary according to fish help, as some terminal emulators don't let the user press F1 key.
Diffstat (limited to 'share/functions/__fish_man_page.fish')
-rw-r--r--share/functions/__fish_man_page.fish4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/functions/__fish_man_page.fish b/share/functions/__fish_man_page.fish
new file mode 100644
index 00000000..17a90315
--- /dev/null
+++ b/share/functions/__fish_man_page.fish
@@ -0,0 +1,4 @@
+function __fish_man_page
+ man (basename (commandline -po; echo)[1]) ^/dev/null
+ or printf \a
+end