Hacker News new | ask | show | jobs
by jack_pp 733 days ago
> what if in future I don't want to execute my .py script with `/usr/bin/python` but `/usr/bin/nohtyp

you're thinking too much, people have had that shebang for 20 years without any problems

> But I really, really just want to run `hello` to call a `hello.py` script that is in my $PATH.

I don't really understand why you're so adamant about this, either make a python "hello" script with a shebang or just tab complete hell<tab> which you should do with most commands anyway so the .py doesn't matter

another option would be to alias but you'd have to do that manually for every frequent script you need

1 comments

Tab complete does not work if the script isn't at CWD, which is the case here since all my script is at ~/bin/.
Tab complete should still work if ~/bin is in $PATH.