Increase yazi functionality in helix
This commit is contained in:
parent
85b60eb42f
commit
2fd21c8c6a
2 changed files with 12 additions and 1 deletions
|
|
@ -49,5 +49,14 @@ if status is-interactive
|
||||||
echo -en "\e]133;A\e\\"
|
echo -en "\e]133;A\e\\"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function y
|
||||||
|
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||||
|
yazi $argv --cwd-file="$tmp"
|
||||||
|
if read -z cwd <"$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||||
|
builtin cd -- "$cwd"
|
||||||
|
end
|
||||||
|
rm -f -- "$tmp"
|
||||||
|
end
|
||||||
|
|
||||||
bind \cz 'fg 2>/dev/null; commandline -f repaint'
|
bind \cz 'fg 2>/dev/null; commandline -f repaint'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,11 @@ render = true
|
||||||
[keys.normal.space]
|
[keys.normal.space]
|
||||||
e = [
|
e = [
|
||||||
':sh rm -f /tmp/unique-file',
|
':sh rm -f /tmp/unique-file',
|
||||||
':insert-output yazi %{buffer_name} --chooser-file=/tmp/unique-file',
|
':sh rm -f /tmp/unique-cwd-file',
|
||||||
|
":insert-output yazi --chooser-file=/tmp/unique-file --cwd-file=/tmp/unique-cwd-file",
|
||||||
':insert-output echo "\x1b[?1049h\x1b[?2004h" > /dev/tty',
|
':insert-output echo "\x1b[?1049h\x1b[?2004h" > /dev/tty',
|
||||||
':open %sh{cat /tmp/unique-file}',
|
':open %sh{cat /tmp/unique-file}',
|
||||||
|
':cd %sh{cat /tmp/unique-cwd-file}',
|
||||||
':redraw',
|
':redraw',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue