8000 [HELP]: how to toggle hidden when in certain directories · Issue #1403 · gokcehan/lf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[HELP]: how to toggle hidden when in certain directories #1403
Closed
@noornee

Description

@noornee

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 ^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0