Proper handle absolute and local path to man page.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 18 Nov 2011 01:09:39 +0200
changeset 267 180d2b4f3253
parent 266 c3dc97f8c1d2
child 268 445d013283e6
Proper handle absolute and local path to man page.
.bashrc
--- a/.bashrc	Fri Nov 18 01:06:42 2011 +0200
+++ b/.bashrc	Fri Nov 18 01:09:39 2011 +0200
@@ -234,6 +234,9 @@
 _man() {
   local p
   local cur=${COMP_WORDS[COMP_CWORD]}
+  if [[ $cur = /* || $cur = ./* ]]; then
+    COMPREPLY=( $(compgen -f -- $cur) )
+  fi
   local IFS=':
 '
   for p in /usr/share/man $MANPATH; do