From 2899c83c2835a56434be50804d14a88f02e2d65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Sun, 21 Apr 2024 17:51:34 +0200 Subject: [PATCH] Better lf on ubuntu --- .config/zsh/.zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index e5c2bef..78aa9f4 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -284,6 +284,11 @@ fi # Aliases ########################################### +if [[ "$(hostname)" == "mallorea" ]]; then + alias lf="/usr/bin/lf -last-dir-path /tmp/lf_dir && cd \"\$(cat /tmp/lf_dir 2> /dev/null || pwd)\"" +else + alias lf="cd \"\$(/usr/bin/lf -print-selection -print-last-dir)\"" +fi if command -v fdfind &> /dev/null; then alias fd="fdfind" @@ -319,7 +324,6 @@ alias vim="nvim" alias dot='/usr/bin/git --git-dir="$HOME/.dotfiles/" --work-tree="$HOME" "$@"' alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts" alias python=python3 -alias lf="cd \"\$(/usr/bin/lf -print-selection -print-last-dir)\"" alias v="nvim -c ':lua require(\"oil\").open()' && cd \"\$(cat /tmp/oil_dir 2> /dev/null || pwd)\"" alias cpr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1" alias mvr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files"