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

Offer a ZSH_EXECUTABLE_PATH or similar? #11

Open
okdana opened this issue Jul 2, 2018 · 0 comments
Open

Offer a ZSH_EXECUTABLE_PATH or similar? #11

okdana opened this issue Jul 2, 2018 · 0 comments
Labels
enhancement has patch A patch (either complete or WIP) has been written question unreported Not reported to the ML

Comments

@okdana
Copy link
Owner

okdana commented Jul 2, 2018

(workers/42202)

Sebastian had wanted some kind of parameter that provided the real, absolute path to the running zsh executable. I responded:

It's slightly irritating because there's no single cross-platform way to do it.
On Linux you can use /proc/self/exe, and some BSDs have a similar mechanism, but
then there's macOS and Solaris and AIX and so on.

I have wanted this feature in the past myself, though, so i would definitely be
in favour of a ZSH_EXECUTABLE_PATH or something. In fact i may look into it now
that you bring it up.

I did look into it, and i came up with a solution that works reliably on all major platforms except for OpenBSD — see my dana/execpath branch. I didn't post it, though; was worried it was too much effort for a feature that not many people will use. I did find that there was some demand for it, however — see below. Not sure if i want to proceed with it or not. If i do, maybe it belongs in zsh/system or something instead?

@okdana okdana added enhancement unreported Not reported to the ML question labels Jul 2, 2018
@okdana okdana added the has patch A patch (either complete or WIP) has been written label Dec 31, 2018
okdana pushed a commit that referenced this issue Dec 13, 2020
…t use a hex dump incantation that may replace some bytes' values with asterisks.

Discussion: zsh-users#11 (comment) et seq

Incidentally, GitHub #11 is also where workers/39786 (commit
zsh-5.2-578-g74aa45910) was first reported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement has patch A patch (either complete or WIP) has been written question unreported Not reported to the ML
Projects
None yet
Development

No branches or pull requests

1 participant