AutoYADM commit: 2025-05-18 18:09:24

This commit is contained in:
Daniel Fichtinger 2025-05-18 18:09:24 -04:00
parent 8b89dc909d
commit c2269876a8
2 changed files with 21 additions and 8 deletions

View file

@ -1,5 +1,16 @@
provide-module fishr %~ provide-module fishr %~
def sh -params .. %{
eval eval "%%sh{""$@"" # %sh{printf '%s ' ""$@"" | grep -o 'kak_\w\+' | tr '\n' ' '}}"
}
def fishtest %{
sh fish -c %{
echo "info -- $kak_buffile"
notify-send "$kak_buffile"
}
}
define-command fish -params 1.. -docstring %{ define-command fish -params 1.. -docstring %{
fish [code]: Execute provided fish code, evaluating its output as Kakoune commands. fish [code]: Execute provided fish code, evaluating its output as Kakoune commands.
} %{ } %{
@ -7,10 +18,10 @@ define-command fish -params 1.. -docstring %{
vars=$( vars=$(
printf %s "$1" | grep -o 'kak_\w*' | sort -u | tr '\n' ' ' printf %s "$1" | grep -o 'kak_\w*' | sort -u | tr '\n' ' '
) )
notify-send "$1" # notify-send "$1"
args='"$1"' tmp="$(mktemp)"
printf %s "eval %sh{ fish -c \"eval $1\" # $vars } " >/tmp/fish-test printf "%s\n%s" "#!/bin/env fish" "$1">"$tmp"
printf %s "eval %sh{ fish -c \"eval $1\" # $vars } " printf %s "eval %sh{ fish $tmp # $vars } ">/tmp/fish-test
} }
} }

View file

@ -2,9 +2,11 @@ eval %sh{ kak-tree-sitter -vvvvv -dks --init $kak_session }
colorscheme ashen colorscheme ashen
require-module fishr require-module fishr
fish %{ def fishtest %{
notify-send $kak_buffile sh fish -c %{
echo "info -- $kak_buffile"
notify-send "$kak_buffile" notify-send "$kak_buffile"
}
} }
set-option global ashen_dynamic_cursor true set-option global ashen_dynamic_cursor true