You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the word specified in the first arg (kakquote) is encountered in a shell expansion, the text of the second arg is prepended to the shell expansion. The text could be source /path/to/file.sh.
It could be adding an element to $PATH, allowing binaries to be shipped with plugins without needing an option to compute their full path. (Although it might be better to have a facility just to set $PATH.)
This could be provided in a module which is required by other modules.
Transitive dependencies (other prelude blobs and variables used by them) can be precomputed and updated when a define-shell-prelude command is read to improve processing time, if needed.
Tmux version detection code used to be copied in two places.
@mawww's fd 3 idea might warrant some best practices for communicating with the fd that could be prelude.
The main idea here is to avoid including unused prelude (for example, prepending kakquote to every shell invocation, even when it isn't used), while still allowing the reuse of shell functions, including those provided by plugins.
The text was updated successfully, but these errors were encountered:
This mechanism looks very brittle, and could potentially backstab users who are not aware some code is being injected into their scripts.
Making users explicitly source a file shipped with Kakoune seems like a safer solution, especially if the hypothetical implementation of the commands being injected is going to be just a call to source.
Or ship full scripts and let the user fix their $PATH, c.f. #1430.
The idea: a command like so:
When the word specified in the first arg (
kakquote
) is encountered in a shell expansion, the text of the second arg is prepended to the shell expansion. The text could besource /path/to/file.sh
.It could be adding an element to
$PATH
, allowing binaries to be shipped with plugins without needing an option to compute their full path. (Although it might be better to have a facility just to set$PATH
.)This could be provided in a module which is required by other modules.
Transitive dependencies (other prelude blobs and variables used by them) can be precomputed and updated when a
define-shell-prelude
command is read to improve processing time, if needed.kakqoute
function added to the prelude of every function.readlink
function #1224 suggests a customreadlink
function.join()
function appears 12 times inrc/
The main idea here is to avoid including unused prelude (for example, prepending
kakquote
to every shell invocation, even when it isn't used), while still allowing the reuse of shell functions, including those provided by plugins.The text was updated successfully, but these errors were encountered: