summaryrefslogtreecommitdiff
path: root/src/shell_manager.hh
AgeCommit message (Collapse)Author
2024-09-17Avoid stdin as a function parameter nameChris Webb
9275d96 introduces a use of stdin as a function parameter name, but POSIX allows stdin to be a macro, which will conflict with this. This breaks the build on musl systems. Rename in the same way as the previous fix for this in c7d887d.
2024-08-26Do not gather full input data in a single string when pipingMaxime Coste
Refactor ShellManager and pipe to feed lines from the buffer directly, this should reduce memory use when piping big chunks of buffers. The pipe output is still provided as a single big buffer.
2023-12-26Fix wrong nameMaxime Coste
2023-11-14Make shell-script-candidates completer run in the backgroundMaxime Coste
Read output from the script as it comes and update the candidate list progressively. Disable updating of the list when a completion has been explicitely selected.
2020-03-02Expand env vars as list of stringsMaxime Coste
This makes it possible to do :select `%val{selections_decs}` and to correctly combine $kak_quoted with those.
2018-08-29Use shell specific quoting for env varsMaxime Coste
Add a test case to validate roundtrips between Kakoune and the shell.
2018-02-18ShellManager: init from a static list of env varsMaxime Coste
No need to go through a static list and then copy them one by one in a vector.
2017-03-15Migrate WithBitOps template specialization to with_bit_ops functionMaxime Coste
This way we dont depend on knowing the base template to enable bit ops on an enum type.
2016-12-15Use a POSIX guaranteed way of getting the shell pathMaxime Coste
2016-11-28Add more memory domains to certain dataMaxime Coste
2016-04-17Add support for env var name completionMaxime Coste
Fixes #659
2015-10-22Wrap the shell params en env vars in a ShellContext structMaxime Coste
2015-09-03Tweak headers in shell_manager.hh, no need for regex.hhMaxime Coste
2015-09-03Regex are overkill for shell manager env vars, we just need exact match or ↵Maxime Coste
prefix match
2015-06-08Do not close stderr/stdout before program finishMaxime Coste
Programs like grep called in '$' command will fail due to SIGPIPE for example. So we need to keep the pipe open.
2015-06-08Specify if ShellManager should read output or not using a flagMaxime Coste
Some program (xclip), will fork a daemon keeping stdout/stderr open, so waiting for them to be closed make kakoune hang. Commands discarding stdout can then just not wait on it.
2015-03-13Change ShellManager to return both stdout and the return value in a pairMaxime Coste
2015-03-09ArrayView content is not const anymoreMaxime Coste
As in upcoming std c++ array_view, ArrayView<T> points to mutable data, use ArrayView<const T> or alias ConstArrayView<T> for const data.
2015-01-12replace all std::vector with VectorMaxime Coste
2015-01-06Rename memoryview to ArrayViewMaxime Coste
2014-12-23Remove trailing blank linesMaxime Coste
2014-11-12Cleanup includesMaxime Coste
2014-10-13Refactor regex uses, do not reference boost except in regex.hhMaxime Coste
2014-06-18Add a %val{...} expand typeMaxime Coste
%val{name} gives access to values given in shell through $kak_<name>
2014-05-05Add '$' for keeping selections that passes a shell commandMaxime Coste
'$' pipes each selections through a given shell command, and only keeps the one that have an exit code of 0 Fixes #36
2014-04-21Use StringView in shell managerMaxime Coste
2014-04-07Add support for querying client environement variablesMaxime Coste
At connection, a remote client sends all its environement to the server, which then provides access to client env through kak_client_env_VAR_NAME variables in the shell.
2014-01-27Fix compilation with clang 3.4Maxime Coste
2014-01-09Style changes, replace typedefs with usingsMaxime Coste
2013-07-26memoryview: always pass by valueMaxime Coste
2013-04-17ShellManager: env_var_regex is an implementation detailMaxime Coste
2013-04-09sort includes directivesMaxime Coste
2013-02-18Fix class/struct mismatchesMaxime Coste
2012-09-09Add support for shell script parametersMaxime Coste
Now %sh{ ... } can access positional parameters through standard shell construct, allowing simple handling of variable parameters. def command accepts -shell-params flag to use this facility.
2012-08-29remove regex.hh, define Regex directly in string.hhMaxime Coste
2012-06-25ShellManager environment variable use a regex instead of an exact matchMaxime Coste
when a kakoune releated env var used in a shell command, the ShellManager tries to match it with given regex and the first that matches calls its value retriever. For this to be useful, EnvVarRetrievers now also take the variable name in its parameters.
2012-05-29Restore piping support.Maxime Coste
Add a ShellManager::pipe method, which pipes a string into the command. Not quite satisfied with this interface.
2012-05-29ShellManager::eval now takes an additional env_var mapMaxime Coste
2012-05-03Add a ShellManager which handles executing shell commandsMaxime Coste
ShellManager provides shell commands with environement variable to retrieve some internal values in the shell parameters.