added man command to lish and a man/ dir for manual pages which can be accessed in less style from within lish
This commit is contained in:
parent
061bc22691
commit
f77e44491d
2 changed files with 18 additions and 1 deletions
|
|
@ -280,4 +280,17 @@ class LishCommander(Exit, ShellCommander, LogCommander):
|
|||
os.system("less " + os.path.dirname(os.path.abspath(__file__)) + "/../../LICENSE")
|
||||
|
||||
def help_license(self):
|
||||
print '''Show license information'''
|
||||
print '''Show license information'''
|
||||
|
||||
def do_man(self, text):
|
||||
try:
|
||||
with open(os.path.dirname(os.path.abspath(__file__)) + "/../../man/" + text + ".md"):
|
||||
os.system("less " + os.path.dirname(os.path.abspath(__file__)) + "/../../man/" + text + ".md")
|
||||
except IOError:
|
||||
self.print_color(RED, "Manual page \"" + text + "\" not found.")
|
||||
self.help_man()
|
||||
|
||||
def help_man(self):
|
||||
print '''usage:
|
||||
man <PAGE> Show manual page
|
||||
'''
|
||||
4
man/jobs.md
Normal file
4
man/jobs.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
This is the manual page for the jobs command.
|
||||
=============================================
|
||||
|
||||
Just for testing some stuff...
|
||||
Loading…
Add table
Add a link
Reference in a new issue