commit abe461461b3a0d6d4e54255c984628a4447b9645 parent e65b51b33c6e219b05aab21c909da2a7b5e6dbdc Author: Chris Down <chris@chrisdown.name> Date: Sun, 19 Mar 2017 07:52:55 +0000 Add clipmenu --help Diffstat:
M | clipmenu | | | 14 | ++++++++++++++ |
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/clipmenu b/clipmenu @@ -9,6 +9,20 @@ cache_file=$cache_dir/line_cache : "${CM_LAUNCHER=dmenu}" +if [[ $1 == --help ]]; then + cat << EOF +clipmenu is a simple clipboard manager using dmenu and xsel. Launch this +when you want to select a clip. + +All arguments are passed through to dmenu itself. + +Environment variables: + +- \$CM_LAUNCHER: specify a dmenu-compatible launcher (default: dmenu) +EOF + exit 0 +fi + # It's okay to hardcode `-l 8` here as a sensible default without checking # whether `-l` is also in "$@", because the way that dmenu works allows a later # argument to override an earlier one. That is, if the user passes in `-l`, our