You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
432 B

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.")