summaryrefslogtreecommitdiff
path: root/rc
diff options
context:
space:
mode:
authorMathieu Ablasou <alexherbo2@gmail.com>2020-11-09 05:46:00 +0100
committerMathieu Ablasou <alexherbo2@gmail.com>2020-11-09 05:46:00 +0100
commit3a98b07387401e458b12c0bce2fe08bef8934a45 (patch)
treec2301a3a4a9c2b9bcc8bc955da29ea3e7dd7ac1c /rc
parent8e6114fef45419cf724c6f4fd8eed1c97592f6ff (diff)
Fix connect.sh content
https://github.com/mawww/kakoune/issues/3875
Diffstat (limited to 'rc')
-rw-r--r--rc/connect.kak7
1 files changed, 5 insertions, 2 deletions
diff --git a/rc/connect.kak b/rc/connect.kak
index cf745cf..9bffd52 100644
--- a/rc/connect.kak
+++ b/rc/connect.kak
@@ -102,11 +102,14 @@ provide-module connect %{
}
define-command detach -params 1.. -shell-completion -docstring 'Write an attachable program to connect.sh and detach the client' %{
- echo -to-file connect.sh -quoting shell %arg{@}
+ # Could be simpler with `echo -to-file <file> -append <text>`
+ # https://github.com/mawww/kakoune/issues/3874
+ echo -to-file connect.sh~ -quoting shell %arg{@}
# Remove connect.sh on source
nop %sh{
- echo 'rm "$0"' >> connect.sh
+ echo 'rm "$0"' | cat - connect.sh~ > connect.sh
+ rm connect.sh~
}
# Detach the client