diff options
| author | omagdy <omar.professional8777@gmail.com> | 2024-12-24 23:58:05 +0200 |
|---|---|---|
| committer | omagdy <omar.professional8777@gmail.com> | 2024-12-24 23:58:05 +0200 |
| commit | 0663abce2fe511810d01cd57490a767c9a4442d5 (patch) | |
| tree | 2f267080c05f34d6e7bbdbb5187944bc649a3c62 /zsh | |
| parent | fa35f50edc8c028dca9ca1ee490faaccf5e148bf (diff) | |
| download | dotfiles-0663abce2fe511810d01cd57490a767c9a4442d5.tar.xz dotfiles-0663abce2fe511810d01cd57490a767c9a4442d5.zip | |
added yazi config
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/.zshrc | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -136,8 +136,9 @@ export PATH="$PATH:/opt/usr/bin/" export PATH="$PATH:$HOME/.scripts/" export PATH="$PATH:$HOME/.cache/lm-studio/bin" export PATH="$PATH:$HOME/.cargo/bin/" -# export PATH="$PATH:/opt/android-sdk/tools/bin" -export ANDROID_HOME="/opt/android-sdk" +export ANDROID_HOME="$HOME/Android/sdk" +export PATH=$PATH:$ANDROID_HOME/emulator +export PATH=$PATH:$ANDROID_HOME/platform-tools # Useful functions @@ -167,6 +168,16 @@ ex () fi } +# Makes yazi change the cwd automatically when exiting +function y() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd + yazi "$@" --cwd-file="$tmp" + if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + builtin cd -- "$cwd" + fi + rm -f -- "$tmp" +} + # Interactive cd fcd() { |
