Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash Feature Request #22795

Open
abdulbadii opened this issue Dec 13, 2024 · 4 comments
Open

Bash Feature Request #22795

abdulbadii opened this issue Dec 13, 2024 · 4 comments

Comments

@abdulbadii
Copy link

Package name

Bash

New version number

No response

Other information that may be useful

Request the feature:
That can have Msys2/Mingw (in Bash CLI environment) , its Bash prompt can execute immediately a file name only string put in prompt, which has
.com
file type and exists in PATH
As it's now would only execute immediately .exe file type of such that put in Bash prompt

Are you willing to submit a PR?

No response

@Biswa96
Copy link
Member

Biswa96 commented Dec 13, 2024

Please rephrase your question. It does not make any sense.

@abdulbadii
Copy link
Author

Ask a feature that can make Msys2/Mingw shell/Bash CLI prompt execute immediately any file name-only string whose extension is
.com
(file type) and lives, exists in PATH, as now such behavior capability only for .exe file type

We all know Windows' .com file is like .exe one too; readily get executed right off

@raedrizqie
Copy link
Contributor

what happens when there are both file.com and file.exe exist in path ?

@rimrul
Copy link
Contributor

rimrul commented Dec 14, 2024

The way Windows does it, to my understanding is two nested loops. The outer loop iterates through the list of directories in PATH. The inner loop iterates over the extensions in PATHEXT and the first matching file gets picked. So if file.exe and file.com exist in the same directory, the result depends on the order of PATHEXT.

For bash to still pick up extensionless scripts, we'd need to treat PATHEXT like there always was an implicit empty entry at the beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants