vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit b73f041f9792d989025b4115c11d15a5c319b1b5 parent 3af95c615b9e66341c643242bded299a0c1b3515 Author: Michael Reed <m.reed@mykolab.com> Date: Sat, 9 Jan 2016 03:35:36 -0500 vis-open: Use basename of $0 in usage message If vis-open is placed in a user's PATH and executed then $0 will be vis-open's absolute path: $ vis-open -h usage: /usr/local/bin/vis-open [-h] [-p prompt] [file-pattern] This isn't very pretty, so use basename(1) on $0: $ vis-open -h usage: vis-open [-h] [-p prompt] [file-pattern] Diffstat:
| M | vis-open | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vis-open b/vis-open @@ -7,7 +7,7 @@ PATTERN="." while [ $# -gt 0 ]; do case "$1" in -h|--help) - echo "usage: $0 [-h] [-p prompt] [file-pattern]" + echo "usage: $(basename $0) [-h] [-p prompt] [file-pattern]" exit 0; ;; -p)