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
# Outputs to shell. Could be updated to change file in place. Explanation here: | |
# https://stackoverflow.com/questions/26991777/regex-sed-how-to-match-the-last-space-character-in-a-line-before-a-72-charac?answertab=active#tab-top | |
sed 'y/ /³/ | |
s/.*/\ | |
&³/ | |
:space | |
s/\(.*\n\)\([^³]\{0,72\}\)³/\1\2 / | |
t space | |
s/\(.*\) \([^³]*³\)/\1\ |
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
# Paste this function into the shell, and/or add it to .bashrc. | |
# Then typing sman ssh will open the ssh man page in sublime text. | |
# Requires sublime text command line options (open with subl) | |
function sman() | |
{ | |
man $1 > /tmp/man && subl /tmp/man | |
} |