X-Git-Url: https://git.ralfj.de/saartuer.git/blobdiff_plain/27ea44f35684aeab9a5677bd64892d6de950fb4e..5bceb6534d5f640dcdd4d5015cecfbad4e82a7b7:/tyshell?ds=inline diff --git a/tyshell b/tyshell index 090403e..9350e12 100755 --- a/tyshell +++ b/tyshell @@ -9,8 +9,7 @@ import socket tuerSock = "/run/tuer.sock" # use a histfile -# FIXME: Why not ".tyshellhist"? -histfile = os.path.join(os.path.expanduser("~"), ".pyshellhist") +histfile = os.path.join(os.path.expanduser("~"), ".tyshellhist") try: readline.read_history_file(histfile) except IOError: @@ -20,7 +19,7 @@ atexit.register(readline.write_history_file, histfile) atexit.register(print, "Bye") # available commands -def help(c): +def helpcmd(c): print("Available commands: %s" % ", ".join(sorted(commands.keys()))) def extcmd(cmd): @@ -48,7 +47,7 @@ def exitcmd(c): commands = { 'exit': exitcmd, - 'help': help, + 'help': helpcmd, 'open': sendcmd(tuerSock, 'open'), 'close': sendcmd(tuerSock, 'close'), 'buzz': sendcmd(tuerSock, 'buzz'),