Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for excluding certain tags #461

Closed
peterhoeg opened this issue Mar 19, 2021 · 7 comments · Fixed by #508
Closed

Support for excluding certain tags #461

peterhoeg opened this issue Mar 19, 2021 · 7 comments · Fixed by #508
Labels
new feature New feature or request

Comments

@peterhoeg
Copy link

Is your feature request related to a problem? Please describe.

When using cheat sheets made by somebody else, there might be large portions that you're not interested in. As an example, using denisidoro's cheats but not caring about concourse CI. It would be awesome to be able to simply exclude everything matching the concourse tag.

Describe the solution you'd like
Having a config file with the list of excluded tags.

Describe alternatives you've considered
An option is to either provide the excluded tags on the command line or via an env var. The former would be annoying, but the latter is perfectly fine.

@peterhoeg peterhoeg added the new feature New feature or request label Mar 19, 2021
@welcome
Copy link

welcome bot commented Mar 19, 2021

Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)

@denisidoro
Copy link
Owner

One solution is to use something like this:

alias n="navi --query '^concourse '"

And then call it by n

Another one is to simply delete some of the downloaded .cheat files.

I implement to add a NAVI_FILTER env var which will act like a grep when processing the input files, so I'll leave this issue open.

@peterhoeg
Copy link
Author

Another one is to simply delete some of the downloaded .cheat files.

That's exactly what I did, but it would be great to still simply pull from 3rd party repos indiscriminately and just filter out later, so your env var sounds great, thank you!

navi is awesome!

@ngirard
Copy link

ngirard commented Apr 17, 2021

Hi @denisidoro,

what is the appropriate command-line semantics for filtering tags ? I had a look at the PR and the commit log, but couldn't figure it out.

@denisidoro
Copy link
Owner

I still need to document it. Building from master, you can use it as follows:

navi --tag-rules='git,!branch' 

This will show snippets which contain the git tag but not the branch tag

@ngirard
Copy link

ngirard commented Apr 19, 2021

Nice ! Thanks for your work !

@papanito
Copy link
Contributor

If I want to exclude all related to fly I tried navi --tag-rules='!fly', but then navi shows 0/0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants