release-1.10release-1.6release-1.7release-1.8release-1.9
Last change
on this file since 21bab95 was
b30c256,
checked in by David Benjamin <davidben@mit.edu>, 15 years ago
|
Add edit:help command for zsh-style in-edit help
zsh has this convenient feature where pressing M-h while typing a
command will look up the man page for the current command and fully
restore your editting session afterwards.
This command brings a similar feature to BarnOwl. Instead of launching
man, we open the usual popwin, which is much easier to restore from.
Signed-off-by: David Benjamin <davidben@mit.edu>
|
-
Property mode set to
100644
|
File size:
301 bytes
|
Rev | Line | |
---|
[b30c256] | 1 | use warnings; |
---|
| 2 | use strict; |
---|
| 3 | |
---|
| 4 | package BarnOwl::Help; |
---|
| 5 | |
---|
| 6 | use BarnOwl::Parse qw(tokenize); |
---|
| 7 | use BarnOwl::Editwin qw(text_before_point text_after_point); |
---|
| 8 | |
---|
| 9 | sub show_help { |
---|
| 10 | my $cmd = shift; |
---|
| 11 | |
---|
| 12 | my $words = tokenize(text_before_point() . text_after_point()); |
---|
| 13 | BarnOwl::help($words->[0]) if @$words; |
---|
| 14 | } |
---|
| 15 | |
---|
| 16 | 1; |
---|
Note: See
TracBrowser
for help on using the repository browser.