AutoYADM commit: 2025-06-15 16:06:51
This commit is contained in:
parent
2a72d57d61
commit
c913755fd7
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue