Sorin Ionescu
12 years ago
3 changed files with 25 additions and 3 deletions
@ -1,8 +1,8 @@
@@ -1,8 +1,8 @@
|
||||
#compdef manp |
||||
#compdef mand manp |
||||
#autoload |
||||
|
||||
# |
||||
# Completes manp. |
||||
# Completes mand and manp. |
||||
# |
||||
# Authors: |
||||
# Sorin Ionescu <sorin.ionescu@gmail.com> |
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
# |
||||
# Opens man pages in Dash.app. |
||||
# |
||||
# Authors: |
||||
# Sorin Ionescu <sorin.ionescu@gmail.com> |
||||
# |
||||
|
||||
function mand { |
||||
if (( $# > 0 )); then |
||||
open "dash://manpages:$1" 2>/dev/null |
||||
if (( $? != 0 )); then |
||||
print "$0: Dash is not installed" >&2 |
||||
break |
||||
fi |
||||
else |
||||
print 'What manual page do you want?' >&2 |
||||
fi |
||||
} |
||||
|
||||
mand "$@" |
||||
|
Loading…
Reference in new issue