Better lf on ubuntu

This commit is contained in:
Thomas Avé 2024-04-21 17:51:34 +02:00
parent bd3fbd2566
commit 2899c83c28
1 changed files with 5 additions and 1 deletions

View File

@ -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"