add and move stuff

This commit is contained in:
2024-04-20 20:11:17 +02:00
parent d33f7da9df
commit 010cf75ce4
78 changed files with 7991 additions and 0 deletions

13
home/bashrc.d/ranger Normal file
View File

@@ -0,0 +1,13 @@
# run ranger-cd
function ranger-cd {
tempfile="$(mktemp -t tmp.XXXXXX)"
ranger --choosedir="$tempfile" "${@:-$(pwd)}"
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"
fi
rm -f -- "$tempfile"
}
alias ranger="ranger-cd"
alias r="ranger-cd"
if [ "$RANGERCD" ]; then unset RANGERCD && ranger-cd; fi