aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/fish_default_key_bindings.fish
diff options
context:
space:
mode:
authorGravatar Konrad Borowski <glitchmr@myopera.com>2013-11-03 13:19:28 +0100
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2013-11-09 19:50:38 +0800
commitba2fcd9dae9ed03ce78e757891b3ad3fb3526c1d (patch)
tree93f6b972d7d97555e4f709b71f50c911fcf290e3 /share/functions/fish_default_key_bindings.fish
parentc0ad54fe02d0631beeafd5208866dc52146e94a2 (diff)
Use basename for man argument
This protects from providing paths to man, like `./a.out`.
Diffstat (limited to 'share/functions/fish_default_key_bindings.fish')
-rw-r--r--share/functions/fish_default_key_bindings.fish2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/functions/fish_default_key_bindings.fish b/share/functions/fish_default_key_bindings.fish
index 7121db38..b22d7696 100644
--- a/share/functions/fish_default_key_bindings.fish
+++ b/share/functions/fish_default_key_bindings.fish
@@ -100,7 +100,7 @@ function fish_default_key_bindings -d "Default (Emacs-like) key bindings for fis
bind \cd delete-or-exit
# Allow reading manpages by pressing F1
- bind -k f1 'man (commandline -po; echo)[1] ^/dev/null; or echo -n \a'
+ bind -k f1 'man (basename (commandline -po; echo))[1] ^/dev/null; or echo -n \a'
# This will make sure the output of the current command is paged using the less pager when you press Meta-p
bind \ep '__fish_paginate'