mirror of
https://github.com/nix-community/home-manager
synced 2024-12-26 03:39:47 +01:00
yazi: update shell integrations and docs
This commit is contained in:
parent
f0c82a5a5c
commit
b66ef037b3
3 changed files with 11 additions and 11 deletions
|
@ -21,7 +21,7 @@ let
|
||||||
function ya
|
function ya
|
||||||
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
||||||
yazi --cwd-file="$tmp"
|
yazi --cwd-file="$tmp"
|
||||||
if set cwd (cat -- "$tmp") && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]
|
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||||
cd -- "$cwd"
|
cd -- "$cwd"
|
||||||
end
|
end
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
|
@ -29,10 +29,10 @@ let
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nushellIntegration = ''
|
nushellIntegration = ''
|
||||||
def-env ya [] {
|
def --env ya [] {
|
||||||
let tmp = (mktemp -t "yazi-cwd.XXXXX")
|
let tmp = $"($env.TEMP)(char path_sep)yazi-cwd." + (random chars -l 5)
|
||||||
yazi --cwd-file $tmp
|
yazi --cwd-file $tmp
|
||||||
let cwd = (cat -- $tmp)
|
let cwd = (open $tmp)
|
||||||
if $cwd != "" and $cwd != $env.PWD {
|
if $cwd != "" and $cwd != $env.PWD {
|
||||||
cd $cwd
|
cd $cwd
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ in {
|
||||||
Configuration written to
|
Configuration written to
|
||||||
{file}`$XDG_CONFIG_HOME/yazi/keymap.toml`.
|
{file}`$XDG_CONFIG_HOME/yazi/keymap.toml`.
|
||||||
|
|
||||||
See <https://github.com/sxyazi/yazi/blob/main/config/docs/keymap.md>
|
See <https://yazi-rs.github.io/docs/configuration/keymap>
|
||||||
for the full list of options.
|
for the full list of options.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -107,7 +107,7 @@ in {
|
||||||
Configuration written to
|
Configuration written to
|
||||||
{file}`$XDG_CONFIG_HOME/yazi/yazi.toml`.
|
{file}`$XDG_CONFIG_HOME/yazi/yazi.toml`.
|
||||||
|
|
||||||
See <https://github.com/sxyazi/yazi/blob/main/config/docs/yazi.md>
|
See <https://yazi-rs.github.io/docs/configuration/yazi>
|
||||||
for the full list of options.
|
for the full list of options.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -131,7 +131,7 @@ in {
|
||||||
Configuration written to
|
Configuration written to
|
||||||
{file}`$XDG_CONFIG_HOME/yazi/theme.toml`.
|
{file}`$XDG_CONFIG_HOME/yazi/theme.toml`.
|
||||||
|
|
||||||
See <https://github.com/sxyazi/yazi/blob/main/config/docs/theme.md>
|
See <https://yazi-rs.github.io/docs/configuration/theme>
|
||||||
for the full list of options
|
for the full list of options
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
function ya
|
function ya
|
||||||
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
||||||
yazi --cwd-file="$tmp"
|
yazi --cwd-file="$tmp"
|
||||||
if set cwd (cat -- "$tmp") && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]
|
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||||
cd -- "$cwd"
|
cd -- "$cwd"
|
||||||
end
|
end
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
shellIntegration = ''
|
shellIntegration = ''
|
||||||
def-env ya [] {
|
def --env ya [] {
|
||||||
let tmp = (mktemp -t "yazi-cwd.XXXXX")
|
let tmp = $"($env.TEMP)(char path_sep)yazi-cwd." + (random chars -l 5)
|
||||||
yazi --cwd-file $tmp
|
yazi --cwd-file $tmp
|
||||||
let cwd = (cat -- $tmp)
|
let cwd = (open $tmp)
|
||||||
if $cwd != "" and $cwd != $env.PWD {
|
if $cwd != "" and $cwd != $env.PWD {
|
||||||
cd $cwd
|
cd $cwd
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue