yazi: add shellWrapperName & rename wrappers to yy

The program shell wrappers have been renamed from `ya` to `yy`
following the introduction of the new CLI tool named `ya`.

With this in mind, the `shellWrapperName` option has been introduced
to provide users with more flexibility in choosing the name they're
most accustomed to (ra, lf, ...).

Co-authored-by: XYenon <register@xyenon.bid>

Co-authored-by: 三咲雅 · Misaki Masa <sxyazi@gmail.com>
This commit is contained in:
eljamm 2024-06-23 15:05:25 +01:00 committed by Robert Helgesson
parent d3bf2a0612
commit 92a26bf6df
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
6 changed files with 29 additions and 7 deletions

View file

@ -2,7 +2,7 @@
let
shellIntegration = ''
function ya() {
function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then

View file

@ -2,7 +2,7 @@
let
shellIntegration = ''
function ya
function yy
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]

View file

@ -2,7 +2,7 @@
let
shellIntegration = ''
def --env ya [...args] {
def --env yy [...args] {
let tmp = (mktemp -t "yazi-cwd.XXXXX")
yazi ...$args --cwd-file $tmp
let cwd = (open $tmp)

View file

@ -2,7 +2,7 @@
let
shellIntegration = ''
function ya() {
function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then