import sys if ( len(sys.argv) > 1 ): shell = sys.argv[1] if ( shell == "fish" ): print("function wh") print(" set -x DO_WHAT_SHELL fish") print(" python3 "+interpreter_location+" $argv | .") print("end") elif ( shell == "bash" or shell == "zsh" ): print("function wh {") print(" export DO_WHAT_SHELL="+shell) print(" source <(python3 "+interpreter_location+" $*)") print("}") else: print("No shell specified.")