Description
I almost always launch lf
from my home directory and i get bombarded with a lot of hidden files; it's overwhelming! /s (just about 12 hidden files)
I'm trying to setup a command? that would toggle hidden files when im not in the home directory. I mean, i know there's a keybinding that was provided by default to do that map zh set hidden!
and that works perfect but i dont want to keep doing that. i want it to be toggled in the UI just by detecting the current directory im on.
here's my attempt at figuring this out
cmd on-cd %{{
current_dir="$(pwd)"
home_dir="$HOME"
if [[ $current_dir != $home_dir ]];then
set hidden true
echo "show hidden"
fi
}}
on-cd
I mean yes, i know, the set hidden true
in the script above isnt using the lf set
special command and im also aware that im not going about this the right way but that's where help comes in!
I would greatly appreciate any help provided ^^