Skip to content
/ bashelp Public

Context sensitive command help for Bash (sort of)

Notifications You must be signed in to change notification settings

wd5gnr/bashelp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

bashelp

Offer help at the bash command prompt. Al Williams

Usage

. bashelp.sh

Near the start of the file is a line:

bind -x '"\C-Y":_bash_help'

You can change the key from Ctrl + Y to something else by changing this line and sourcing the file again.

Options

The way that bashelp shows man pages can be configured through environment variables, without modifying the script itself. The default settings, shown below, tell bashelp to run man in an xterm:

BASHELP_MANPGM=man
BASHELP_TERMINAL=xterm
BASHELP_USEBROWSER=0

Supported values for BASHELP_TERMINAL are:

  • man (runs man in the current terminal)
  • screen (shows man pages in a new window of GNU Screen)
  • tmux (shows man pages in a new window of tmux)
  • gnome-terminal
  • Any terminal that takes the same command-line options as xterm

Graphical terminals can be passed additional options using BASHELP_TERMOPT.

Or, you can run a GUI man reader like yelp by setting:

BASHELP_MANPGM="yelp"
BASHELP_PREFIX="man:"
BASHELP_TERMINAL=
BASHELP_USEBROWSER=0

Or, you can open a web site using the default web browser by setting:

BASHELP_USEBROWSER=1
BASHELP_SITE="http://man.he.net/?section=all&topic=" #(or equivalent)

Or, you can open a local man page in a browser by setting:

BASHELP_MANPGM=man
BASHELP_USEBROWSER=1
BASHELP_SITE=
BASHELP_MANOPT="-H "
BROWSER=google-chrome

About

Context sensitive command help for Bash (sort of)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages