/usr/share/wajig/shell.py is in wajig 2.13.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/usr/bin/python3
#
# This file is part of wajig. The copyright file is at debian/copyright.
import subprocess
import readline
import os
import atexit
HISTFILE = os.path.join(os.environ["HOME"], ".wajig", ".wajig-history")
def main():
try:
readline.read_history_file(HISTFILE)
except IOError:
pass
readline.parse_and_bind('tab: complete')
while True:
command_line = input("wajig> ")
if command_line in "exit quit bye".split():
return
if command_line:
command = "wajig " + command_line
subprocess.call(command.split())
if __name__ == "__main__":
try:
main()
except EOFError:
print()
atexit.register(readline.write_history_file, HISTFILE)
|