Skip to content

Commit

Permalink
Remove white text from usage messages (#204)
Browse files Browse the repository at this point in the history
* Remove white text from usage messages

* Bold options in usage messages + tests.
  • Loading branch information
cmcaine authored and rkitover committed Oct 19, 2016
1 parent b6203ca commit a7d18ce
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 40 deletions.
20 changes: 10 additions & 10 deletions test/fixtures/vimcat-help.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Usage: vimcat [OPTION]... [FILE | -]...
Usage: vimcat [OPTION]... [FILE | -]...
Display FILE(s) in the terminal with (n)vim syntax highlighting using ANSI escape codes.

With no FILE, or when FILE is -, read standard input.

-h, --help, --usage This help screen.
-v, --version Show version information and exit.
-n Print with line numbers.
-s Squeeze multiple blank lines into one.
-o FILE | - Output ANSI highlighted text to FILE or standard output.
--cmd COMMAND Run (n)vim COMMAND before initialization.
-c COMMAND Run (n)vim COMMAND after initialization.
-u FILE Use FILE as the vimrc.
-x  Give debugging output on stderr.
-h, --help, --usage This help screen.
-v, --version Show version information and exit.
-n Print with line numbers.
-s Squeeze multiple blank lines into one.
-o FILE | - Output ANSI highlighted text to FILE or standard output.
--cmd COMMAND Run (n)vim COMMAND before initialization.
-c COMMAND Run (n)vim COMMAND after initialization.
-u FILE Use FILE as the vimrc.
-x  Give debugging output on stderr.

Examples:
vimcat program.py # output program.py with highlighting to terminal
Expand Down
20 changes: 10 additions & 10 deletions test/fixtures/vimpager-help.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Usage: vimpager [OPTION]... [FILE | -]...
Usage: vimpager [OPTION]... [FILE | -]...
Display FILE(s) in (n)vim with a pager emulating less.

With no FILE, or when FILE is -, read standard input.

-h, --help, --usage Show this help screen and exit.
-v, --version Show version information and exit.
+G, + Go to the end of the file.
-N, --LINE-NUMBERS Show line numbers.
-s Squeeze multiple blank lines into one.
--cmd COMMAND Run (n)vim COMMAND before initialization.
-c COMMAND Run (n)vim COMMAND after initialization.
-u FILE Use FILE as the vimrc.
-x  Give debugging output on stderr.
-h, --help, --usage Show this help screen and exit.
-v, --version Show version information and exit.
+G, + Go to the end of the file.
-N, --LINE-NUMBERS Show line numbers.
-s Squeeze multiple blank lines into one.
--cmd COMMAND Run (n)vim COMMAND before initialization.
-c COMMAND Run (n)vim COMMAND after initialization.
-u FILE Use FILE as the vimrc.
-x  Give debugging output on stderr.

Examples:
vimpager program.py # view program.py in the pager
Expand Down
20 changes: 10 additions & 10 deletions vimcat
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,20 @@ do_sleep() {

usage() {
cat <<'EOF'
Usage: [32mvimcat [1;34m[[1;35mOPTION[1;34m][0m... [1;34m[[1;35mFILE [1;37m| [1;35m-[1;34m][0m...
Usage: [32mvimcat [1;34m[[1;35mOPTION[1;34m][0m... [1;34m[[1;35mFILE [1m| [1;35m-[1;34m][0m...
Display FILE(s) in the terminal with (n)vim syntax highlighting using ANSI escape codes.
With no FILE, or when FILE is -, read standard input.
[1;37m-h, --help, --usage[0m This help screen.
[1;37m-v, --version[0m Show version information and exit.
[1;37m-n[0m Print with line numbers.
[1;37m-s[0m Squeeze multiple blank lines into one.
[1;37m-o [1;35mFILE[0m | [1;35m-[0m Output ANSI highlighted text to [1;35mFILE[0m or standard output.
[1;37m--cmd [1;35mCOMMAND[0m Run (n)vim [1;35mCOMMAND[0m before initialization.
[1;37m-c [1;35mCOMMAND[0m Run (n)vim [1;35mCOMMAND[0m after initialization.
[1;37m-u [1;35mFILE[0m Use [1;35mFILE[0m as the vimrc.
[1;37m-x [0m Give debugging output on stderr.
[1m-h, --help, --usage[0m This help screen.
[1m-v, --version[0m Show version information and exit.
[1m-n[0m Print with line numbers.
[1m-s[0m Squeeze multiple blank lines into one.
[1m-o [1;35mFILE[0m | [1;35m-[0m Output ANSI highlighted text to [1;35mFILE[0m or standard output.
[1m--cmd [1;35mCOMMAND[0m Run (n)vim [1;35mCOMMAND[0m before initialization.
[1m-c [1;35mCOMMAND[0m Run (n)vim [1;35mCOMMAND[0m after initialization.
[1m-u [1;35mFILE[0m Use [1;35mFILE[0m as the vimrc.
[1m-x [0m Give debugging output on stderr.
Examples:
vimcat program.py # output program.py with highlighting to terminal
Expand Down
20 changes: 10 additions & 10 deletions vimpager
Original file line number Diff line number Diff line change
Expand Up @@ -614,20 +614,20 @@ quit() {

usage() {
cat <<'EOF'
Usage: [32mvimpager [1;34m[[1;35mOPTION[1;34m][0m... [1;34m[[1;35mFILE [1;37m| [1;35m-[1;34m][0m...
Usage: [32mvimpager [1;34m[[1;35mOPTION[1;34m][0m... [1;34m[[1;35mFILE [1m| [1;35m-[1;34m][0m...
Display FILE(s) in (n)vim with a pager emulating less.
With no FILE, or when FILE is -, read standard input.
[1;37m-h, --help, --usage[0m Show this help screen and exit.
[1;37m-v, --version[0m Show version information and exit.
[1;37m+G, +[0m Go to the end of the file.
[1;37m-N, --LINE-NUMBERS[0m Show line numbers.
[1;37m-s[0m Squeeze multiple blank lines into one.
[1;37m--cmd [1;35mCOMMAND[0m Run (n)vim [1;35mCOMMAND[0m before initialization.
[1;37m-c [1;35mCOMMAND[0m Run (n)vim [1;35mCOMMAND[0m after initialization.
[1;37m-u [1;35mFILE[0m Use [1;35mFILE[0m as the vimrc.
[1;37m-x [0m Give debugging output on stderr.
[1m-h, --help, --usage[0m Show this help screen and exit.
[1m-v, --version[0m Show version information and exit.
[1m+G, +[0m Go to the end of the file.
[1m-N, --LINE-NUMBERS[0m Show line numbers.
[1m-s[0m Squeeze multiple blank lines into one.
[1m--cmd [1;35mCOMMAND[0m Run (n)vim [1;35mCOMMAND[0m before initialization.
[1m-c [1;35mCOMMAND[0m Run (n)vim [1;35mCOMMAND[0m after initialization.
[1m-u [1;35mFILE[0m Use [1;35mFILE[0m as the vimrc.
[1m-x [0m Give debugging output on stderr.
Examples:
vimpager program.py # view program.py in the pager
Expand Down

0 comments on commit a7d18ce

Please sign in to comment.