From c913755fd772fe47cb61a2e9ba30a4dbf9327f05 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sun, 15 Jun 2025 16:06:51 -0400 Subject: [PATCH] AutoYADM commit: 2025-06-15 16:06:51 --- .config/fish/functions/mksh.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.config/fish/functions/mksh.fish b/.config/fish/functions/mksh.fish index fe1a808d..522e1dad 100644 --- a/.config/fish/functions/mksh.fish +++ b/.config/fish/functions/mksh.fish @@ -3,9 +3,10 @@ function mksh --description 'make executable shell script' set name $argv[1] set file $name.sh if set -q _flag_e - set cmd (printf 'rename-buffer -file %s ; set buffer filetype sh ; hook -once -always buffer BufWritePost %s %s ; hook -once -always buffer NormalIdle .* %s' "$file" "$(string replace -a . \\. -- $file)" "%{ nop %sh { notify-send 'this runs' } }" "%{ exec -with-hooks gji }") + set cmd (printf 'rename-buffer -file %s \\n set buffer filetype sh \\n hook -once -always buffer BufWritePost %s %s \\n hook -once -always buffer NormalIdle .* %s' "$file" "$(string replace -a . \\. -- $(path resolve $file))" "%{ nop %sh{ notify-send hey } }" "%{ exec -with-hooks gji }") # set cmd (printf 'rename-buffer -file %s ; set buffer filetype sh ; hook -once -always buffer BufWritePost %s %s ; hook -once -always buffer NormalIdle .* %s' "$file" "$(string replace -a . \\. -- $file)" "%{ nop %sh { chmod +x $(path resolve $file) } }" "%{ exec -with-hooks gji }") printf '#!/bin/sh\n\n' | kak -e "$cmd" + # printf '#!/bin/sh\n\n' | kak -e "echo -debug -- $cmd" else printf '#!/bin/sh\n\n' >$file chmod +x $file