From ac3e2f987b2364dd02805a2ad40c327b8da46758 Mon Sep 17 00:00:00 2001 From: tavo Date: Tue, 28 Oct 2025 20:30:12 -0600 Subject: [PATCH] updat --- scripts/e | 3 +++ shell/aliases.sh | 3 +-- shell/profile.d/defaults.sh | 4 ++-- shell/profile.d/yazi.sh | 9 +++++++++ 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100755 scripts/e create mode 100644 shell/profile.d/yazi.sh diff --git a/scripts/e b/scripts/e new file mode 100755 index 0000000..8271678 --- /dev/null +++ b/scripts/e @@ -0,0 +1,3 @@ +#!/bin/sh + +VIMINIT= nvim $@ diff --git a/shell/aliases.sh b/shell/aliases.sh index eaca99b..f74737e 100644 --- a/shell/aliases.sh +++ b/shell/aliases.sh @@ -50,5 +50,4 @@ alias \ scp="scp ${SSH_CONFIG}" \ rsync="rsync --rsh \"ssh ${SSH_CONFIG}\"" \ lg="lazygit" \ - adb='HOME="$XDG_DATA_HOME"/android adb' \ - lvim="VIMINIT= nvim" + adb='HOME="$XDG_DATA_HOME"/android adb' diff --git a/shell/profile.d/defaults.sh b/shell/profile.d/defaults.sh index 641109d..4d1755a 100644 --- a/shell/profile.d/defaults.sh +++ b/shell/profile.d/defaults.sh @@ -3,5 +3,5 @@ export \ TERM="xterm-256color" \ BROWSER="firefox" \ - EDITOR="lvim" \ - VISUAL="lvim" + EDITOR="e" \ + VISUAL="em" diff --git a/shell/profile.d/yazi.sh b/shell/profile.d/yazi.sh new file mode 100644 index 0000000..ba1b73f --- /dev/null +++ b/shell/profile.d/yazi.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +y() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd + yazi "$@" --cwd-file="$tmp" + IFS= read -r -d '' cwd <"$tmp" + [ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd" + rm -f -- "$tmp" +}