AutoYADM commit: 2025-05-21 14:42:18
This commit is contained in:
parent
a775f45aa1
commit
2fe337e881
1 changed files with 25 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
|||
define-command open-yazi %{
|
||||
declare-user-mode yazi
|
||||
map -docstring "Yazi" global user <space> ': enter-user-mode yazi<ret>'
|
||||
|
||||
define-command open-yazi-this-client %{
|
||||
evaluate-commands %sh{
|
||||
rm -f /tmp/yazi-path &>/dev/null
|
||||
# TODO: make this use %opt{termcmd} instead
|
||||
|
@ -12,4 +15,24 @@ define-command open-yazi %{
|
|||
fi
|
||||
}
|
||||
}
|
||||
map -docstring "open file in yazi" global user <space> ": open-yazi<ret>"
|
||||
map -docstring "open a file with yazi (blocking)" global yazi f ": open-yazi-this-client<ret>"
|
||||
|
||||
define-command spawn-yazi %{
|
||||
terminal yazi
|
||||
}
|
||||
map global -docstring "spawn yazi" global yazi <space> ': spawn-yazi<ret>'
|
||||
|
||||
define-command open-yazi-new-client %{
|
||||
evaluate-commands %sh{
|
||||
rm -f /tmp/yazi-path &>/dev/null
|
||||
# TODO: make this use %opt{termcmd} instead
|
||||
footclient -d error yazi $kak_buffile --chooser-file=/tmp/yazi-path &>/dev/null
|
||||
P="$(cat /tmp/yazi-path)"
|
||||
out="info -markup -title {title}Yazi"
|
||||
if [ -z "$P" ]; then
|
||||
echo "info -markup -title {title}Yazi 'No file selected.'"
|
||||
else
|
||||
echo "new edit $P"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue