Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PATHEXT for Bash?

Name: Anonymous 2006-05-25 7:16

Is there any kind of PATHEXT for Bash?

PATHEXT, a feature of CMD.EXE and the Windows shell API, is like PATH for file extensions. If, for example, you set it to ".EXE;.PL", and launch "lol", for each directory in PATH, it will try to find "lol" as is, then "lol.EXE", then "lol.PL". Windows will start the first file found.

Start means it'll look for the default shell action and do it. If it's a Perl file, it'll run it through Perl. If it's an executable, it'll directly execute it. This avoids having to do the #!/lol_my_folder_is_different/perl shit in scripts) and allows you to launch anything associated with any command. I don't expect this to be possible under Lunix because you have no global file associations, but would at least there be a PATHEXT equivalent?

Name: Anonymous 2006-05-25 9:13

>>2
That doesn't do what I want; I want to launch my Perl, Python, PHP, etc. scripts without having to type the extension (.pl, .py, .php, etc.) all the time, and while being able to tell which language is what (hence the extension) for a number of reasons.

>>3
Told ya I was funny ^_^. I already know that, but I find no extensions means you're not able to tell what an executable is beforehand - whether it's executable code, a shell script for some shell, or an interpreted script in some language, etc.

And oh, no associations is a feature? Ok, please make it so that whenever I execute an image I can view it in xzgv, and add a generic print method for printing anything, for example.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List