-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[WIP] share: Introduce the sh
directory, mktemp
implementation
#1430
Conversation
e334f54
to
9d993ca
Compare
rc/base/lint.kak
Outdated
@@ -8,6 +8,8 @@ decl -hidden range-specs lint_errors | |||
|
|||
def lint -docstring 'Parse the current buffer with a linter' %{ | |||
%sh{ | |||
export PATH="${PATH}:${kak_runtime}/sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a '# mktemp fallback' comment should follow, to make it explicit which fallback we try to import
I added a comment hinting that we modify the path to have access to the |
As it turned out after merging #1429, even such a simple utility uses different flags depending on the environment (GNU or mac basically). I think we should not extend the |
Yeah, I am still on the fence about this change (I know I suggested it 😛), I tend to think we should not start adding a set of additional commands bundled with Kakoune, but we are hitting these portability problems from time to time. Kakoune should not try to fix posix problems itself, we try to stay as posix as possible to maximize portability, but if we dont have an acceptable tool provided by posix, I am not sure we should be rolling our own instead of just depending on the lowest common denominator that is usually available. This needs more discussions and thoughts... |
Note that the original idea was to provide a minimal fallback implementation in case the tools were not available on the system. I'm OK with not trying to abstract already existing APIs (e.g. GNU vs BSD I'll rework the |
This commit installs an `sh` directory in the `share` directory, in which implementations of popular tools that might not be available on a user's system sit. In order for a shell scope to use those implementations if the regular binaries are unavailable, the `PATH` variable has to be modified as follows, at the beginning of the scope: ``` %sh{ export PATH="${PATH}:${kak_runtime}/sh" <code> } ```
Rebased on f9c4823, simplify the |
sh
directory, mktemp
implementationsh
directory, mktemp
implementation
I am wondering on which platform dont we have mktemp available ? |
Good point, So really the only script we could use now is |
sh
directory, mktemp
implementationsh
directory, mktemp
implementation
This commit installs an
sh
directory in the share directory, in whichimplementations of popular tools that might not be available on a user's
system sit.
In order for a shell scope to use those implementations if the regular
binaries are unavailable, the
PATH
variable has to be modified as follows,at the beginning of the scope: