-
Notifications
You must be signed in to change notification settings - Fork 720
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
[REQUEST] please expose current kakoune executable being... executed #4433
Comments
It could be nice to expose the underlying socket path too, so we won’t need to spawn a process for each |
When Kakoune launches a shell-block, it prefixes Lines 76 to 82 in 19e2225
That way, scripts that naively invoke |
That's also considered in kakoune-lsp/kakoune-lsp#553. Not sure what are reasonable use cases, |
Then I guess the remaining limitation is that the binary has to be named |
... or is that a real symlink in a removed tmp dir? |
When you run https://github.com/mawww/kakoune/blob/master/src/Makefile#L93-L96 Meanwhile, https://github.com/mawww/kakoune/tree/master/libexec/kak/kak If you You can definitely break this system if you copy the binary to a new location without also copying the libexec directory to the same relative path, but you can also break things by omitting to copy the system kakrc or the standard library plugins or the online documentation, so it's no different in that respect. |
Even if you rename your kak binary to something really custom, you can get around this problem on linux by executing "/proc/${kak_session}/exe" -p $kak_session The Edit: I realize that there might be some issues with named kak sessions so this approach will not work in all cases.. |
What’s your usecase? |
Hmm... I thought about this more. Something like
should always work in linux if you have a custom name for your kak executable (and even if you have named sessions...) |
It's nothing "really custom", it's compiling with gcc/clang (with their versions) and finishing up with install/install-strip. In order to test bugs, one needs multiple executables around, being spawned predicatably.
Yes! But that's Linux-only. Why not expose |
OK. For now, the workaround is to install each |
Feature
Please expose the current kakoune executable, so that background
%sh{}
scripts can run"$kak_bin" -p ...
.In an environment containing multiple
kak
versions (e.g./opt/kak-master
,/usr/bin/kak
,/opt/kak-v2021.11.08
etc, with symlinks on top of that) it's confusing to tell whichkak
is being executed. Granted,kak -p
only acts as a client, and probably can send commands just fine, and probably reads the same config files as the session-master; but this is just another uncertainty layer lurking in the back.Another reason:
kak
may not be in the$PATH
at all.Usecase
No response
The text was updated successfully, but these errors were encountered: