Commit Graph

9112 Commits

Author SHA1 Message Date
Maxime Coste
64e306f64b Document command-fifo in changelog 2021-07-07 19:46:47 +10:00
Maxime Coste
5ed9e1b356 Catch errors while executing shell commands
Log error to debug buffer and Change the 'waiting for shell' face
to 'Error'.

Update the 'waiting for shell' message when the shell has exited
but Kakoune is still waiting on stdin/stdout/stderr to be closed.
2021-07-07 19:25:06 +10:00
Maxime Coste
2b68b6737c Update spell.kak to use command/response fifo 2021-07-07 19:25:06 +10:00
Maxime Coste
3d7fb8ddbc Add support for $kak_command_fifo and $kak_response_fifo
Those fifos are accessible during %sh{...} blocks, the command fifo
executes commands written to it once the write end side is closed
(multiple open/write/close sequences are supported), the response
fifo is a simple helper fifo available to write response back to
the shell process

An example use of this feature is to request some list options
content from without being limited by the environment size:
```
%sh{
    echo "echo -to-file $kak_response_fifo -quoting shell -- %opt{some_list}" > $kak_command_fifo
    eval "set -- $(cat $kak_response_fifo)"
}
```
2021-07-07 19:25:06 +10:00
Maxime Coste
6215bff764 Decouple generate_env from actual ShellManager env var collection 2021-07-07 19:25:06 +10:00
Maxime Coste
394a104405 Merge remote-tracking branch 'Screwtapello/doc-improvements' 2021-07-07 19:18:27 +10:00
Maxime Coste
0c92ec8a23 Merge remote-tracking branch 'Screwtapello/save-restore-window-title' 2021-07-07 19:16:07 +10:00
Maxime Coste
699050d2d6 Merge remote-tracking branch 'alexherbo2/add-missing-eruby-indent-group' 2021-07-07 19:15:28 +10:00
Maxime Coste
7172481db3 Merge remote-tracking branch 'greenfork/restore-terminal-when-suspending' 2021-07-07 19:14:45 +10:00
Maxime Coste
8c2ee492fe Merge remote-tracking branch 'dmerejkowsky/dart-extension-keyword' 2021-07-07 19:13:29 +10:00
Maxime Coste
29b6f06577 Merge remote-tracking branch 'maximbaz/spell-ignore-minus' 2021-07-07 19:13:02 +10:00
Maxime Coste
5b7d544299 Merge remote-tracking branch 'Frojdholm/markdown-codeblock-highlighting' 2021-07-07 19:09:05 +10:00
Hampus Fröjdholm
e0731b70cf Improve highlighting of markdown lists
Removes the inline code highlighter for lists to improve
readability in indented lists.
2021-07-06 13:32:23 +02:00
Maxim Baz
0289131c24
spell.kak: ignore another undocumented control char 2021-07-01 21:52:59 +02:00
Dimitri Merejkowsky
0c1e89a010 dart: add extension to the list of keywords 2021-07-01 16:03:30 +02:00
Dmitry Matveyev
dbfbb1b5a6 Restore terminal during suspend before changing alternate screen 2021-06-27 16:49:39 +06:00
Maxime Coste
c68f85659f Handle Ctrl+Z key later in the terminal input stack
The previous handling code was at a pretty random location and broke
terminals that could send <c-z> encoded in a non pure ascii way.

See #4238
2021-06-27 16:56:29 +10:00
Maxime Coste
4fd0fc3d80 Merge remote-tracking branch 'alexherbo2/fix-windowing-detection-priority' 2021-06-26 12:54:24 +10:00
Maxime Coste
17c670f52c Merge remote-tracking branch 'hristost/patch-1' 2021-06-26 10:00:50 +10:00
Maxime Coste
272350c32c Merge remote-tracking branch 'somasis/mandoc' 2021-06-26 10:00:01 +10:00
Maxime Coste
f0f3c0f735 Merge remote-tracking branch 'SolitudeSF/mode' 2021-06-26 09:59:45 +10:00
Sidharth Kshatriya
c5a1ddeaff Better style 2021-06-24 19:53:38 +05:30
Sidharth Kshatriya
5244ecbe9b Also deal with variables named kak_quoted_* by using a more generic approach 2021-06-24 19:49:54 +05:30
Hristo Staykov
69c9d00569
rc swift: Add open and internal keywords 2021-06-24 14:29:10 +03:00
Sidharth Kshatriya
0ca81e7cec Fix: Kakoune passed environment variables in shell invocations are repeated
If a %sh{} script refers to any variables multiple times they are all multiply
included in the environment. Example: if a %sh{} invocation refers to
${kak_buffile} 5 times, the environment will have "kak_buffile=..." repeated 5
times and so on. This repetition happens for each multiply used variable that
is passed into the environment.

The variable should, of course, be only passed into the environment once. This
commit should fix this issue.
2021-06-24 14:03:58 +05:30
Sidharth Kshatriya
ab3a577a43 Sidharth Kshatriya Copyright Waiver
I dedicate any and all copyright interest in this software to the
  public domain.  I make this dedication for the benefit of the public at
  large and to the detriment of my heirs and successors.  I intend this
  dedication to be an overt act of relinquishment in perpetuity of all
  present and future rights to this software under copyright law.
2021-06-24 13:52:44 +05:30
Maxime Coste
be9b2de0ee Only compute command coordinates when necessary
Tracking the line/column of each token takes a surprising big part
of the command parsing logic runtime and is only necessary when we
hit an error.
2021-06-24 17:20:37 +10:00
Maxime Coste
49e2ecdcdb Fix invalid command profiling logic 2021-06-24 17:14:10 +10:00
Taupiqueur
3fe4367ce0 Fix windowing detection priority 2021-06-21 16:05:09 +02:00
SolitudeSF
9fff572aab
Restore terminal before switching from alternate screen 2021-06-18 08:22:59 +03:00
Kylie McClain
f5e478e9de doc/kak.1: Convert to mdoc(7) semantic markup
This aids in making it more uniform in style with most manuals on *nix
systems in terms of formatting. Plus, the semantic markup will make it
easier to maintain and less reliant on writing for the renderer.
2021-06-15 21:04:22 -04:00
Taupiqueur
59d39c60d7 Add missing eRuby indent group 2021-06-15 14:30:35 +02:00
Maxime Coste
8fdda6d980 Merge remote-tracking branch 'greenfork/improve-elixir-hooks' 2021-06-15 20:48:06 +10:00
Maxime Coste
682426bf7b Merge remote-tracking branch 'greenfork/improve-ruby-hooks' 2021-06-15 20:47:26 +10:00
Maxime Coste
a1a924f9a5 Merge remote-tracking branch 'ktiy/zig' 2021-06-15 20:45:43 +10:00
Maxime Coste
3497e05fce Merge remote-tracking branch 'gkrrr/master' 2021-06-15 20:44:21 +10:00
Maxime Coste
cdadcbaf16 Merge remote-tracking branch 'razcore-code/fix-purescript' 2021-06-15 20:43:09 +10:00
Maxime Coste
d78da60b45 Merge remote-tracking branch 'Screwtapello/document-completion-escaping' 2021-06-15 20:40:19 +10:00
Maxime Coste
70cb15f9b9 Merge remote-tracking branch 'Screwtapello/document-default-extra-word-chars' 2021-06-15 20:39:46 +10:00
Tim Allen
7c48a72e11 src: Restore the window title when quitting or suspending Kakoune.
Fixes #4228.
2021-06-15 12:04:21 +10:00
syntonym
3be80f711e update IRC channel location 2021-06-13 16:54:19 +02:00
c piapiac
bdd7a956f3
rc zig: auto-insert multiline string prefix on newline 2021-06-12 03:38:27 -07:00
c piapiac
73910efce8
rc zig: 0.8.0 language changes
* adds nosuspend keyword
* adds @extern builtin
* removes @TagType builtin
2021-06-12 03:26:32 -07:00
c piapiac
421321a301
C. C. Piapiac Copyright Waiver
I dedicate any and all copyright interest in this software to the
public domain. I make this dedication for the benefit of the public a
large and to the detriment of my heirs and successors. I intend this
dedication to be an overt act of reliquishment in perpetuity of all
present and future rights to this software under copyright law.
2021-06-12 02:27:59 -07:00
Tim Allen
bdb668ba54 Document how to escape special characters in completions. 2021-06-11 00:27:13 +10:00
Tim Allen
b228232de7 Clarify which parts of Kakoune the extra_word_chars option affects.
Also, document the "empty option implies underscore" quirk.
2021-06-09 17:50:30 +10:00
Dmitry Matveyev
2f22fef5bd Rename exec->execute-keys for consistency 2021-06-06 14:29:51 +06:00
Dmitry Matveyev
a65501a1d9 Rename exec->execute-keys for consistency 2021-06-06 14:28:28 +06:00
Dmitry Matveyev
4e94bf0e41 Event better tests for comments 2021-06-06 14:27:39 +06:00
Dmitry Matveyev
8574c3827a Event better tests for comments 2021-06-06 14:25:06 +06:00