-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Botspot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Add a bit of color coding to the documentation for linux commands. | ||
You may have used the man command before. | ||
man grep | ||
man sudo | ||
man ffmpeg | ||
These are the manuals for all your linux commands, but everything is black and white. This script adds a red color to the program flag options, and gives a green color to any underlined text in the document. Result: more easily readible and digestable manpages. | ||
|
||
To customize the colors, go familiarize yourself with the shell color codes here: https://misc.flogisoft.com/bash/tip_colors_and_formatting | ||
Then, as root, go edit this file: /usr/local/bin/man |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
#adapted from https://www.howtogeek.com/683134/how-to-display-man-pages-in-color-on-linux/ | ||
|
||
sudo mkdir -p /usr/local/bin | ||
|
||
status "Creating /usr/local/bin/man" | ||
echo "#!/bin/bash | ||
LESS_TERMCAP_md=$'\e[01;31m' \ | ||
LESS_TERMCAP_me=$'\e[0m' \ | ||
LESS_TERMCAP_us=$'\e[01;32m' \ | ||
LESS_TERMCAP_ue=$'\e[0m' \ | ||
LESS_TERMCAP_so=$'\e[46;30m' \ | ||
LESS_TERMCAP_se=$'\e[0m' \ | ||
/usr/bin/man "\""$@"\" | sudo tee /usr/local/bin/man >/dev/null | ||
|
||
status "Making executable: /usr/local/bin/man" | ||
sudo chmod +x /usr/local/bin/man |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
sudo rm -f /usr/local/bin/man |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters