X-Git-Url: https://git.ralfj.de/saartuer.git/blobdiff_plain/afd14c9b67b6fb41219abf0dcd5e7fda37a1b8a9..83d646a505bed8c75eef15855da7046e5854106d:/tyshell 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'),