mise icon indicating copy to clipboard operation
mise copied to clipboard

Ability to permanently ignore/untrust a config

Open scop opened this issue 1 year ago • 5 comments

There are some specific dirs with configs in them that I would like to be permanently set in untrusted/ignored mode, and not be bothered about when I cd to the dir with them in effect. I couldn't find an option to do that in the CLI or in the config, so it seems the feature does not exist.

Something like rtx trust --untrust --permanent could be it. rtx trust would then make such marked one trusted though.

scop avatar Aug 03 '23 04:08 scop

we should just add an RTX_IGNORED_CONFIGS setting I think that would override any config file

jdx avatar Aug 03 '23 12:08 jdx

Being able to set a specific one in a specific dir as ignored right from the console when meeting one would be convenient though. While an env var would work too, editing it would be manual shell specific work (I guess), and might not arguably scale that well with many full paths in it. To clarify (wording in my initial comment was a bit vague, clarified it), what I'm after is the ability to ignore configs for some specific location, not files with some name in arbitrary dirs.

scop avatar Aug 03 '23 19:08 scop

actually I'm thinking maybe --permanent should just be the behavior for --untrust or if you just say "n" when it prompts. I don't think rtx should prompt again.

jdx avatar Aug 03 '23 23:08 jdx

@scop I just noticed that you can do this today with an en var or setting I think:

https://github.com/jdxcode/rtx/blob/892c752aa56b70cd725eb5e271fc06bffa158b42/src/config/config_file/mod.rs#L167

I haven't tested but it looks like if you set settings.trusted_config_paths or RTX_TRUSTED_CONFIG_PATHS you can use a partial path and it will trust anything under that.

jdx avatar Aug 24 '23 15:08 jdx

Hm, on first sight, that doesn't quite seem to fit for my use case -- I don't have a specific prefix under which I'd like to trust everything, which is what I gather this would help with. It sound like the the opposite of what I'm after; mine is about untrusting things permanently.

scop avatar Aug 26 '23 09:08 scop