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

Don't display context separators when only listing files #693

Closed
tupton opened this issue Nov 27, 2017 · 1 comment
Closed

Don't display context separators when only listing files #693

tupton opened this issue Nov 27, 2017 · 1 comment

Comments

@tupton
Copy link

tupton commented Nov 27, 2017

❯ command rg --context=3 -l "context-separator"
complete/_rg
--
doc/rg.1.md
--
src/app.rs
--
src/args.rs

When listing files, even if --context is an option, I don't think we need the context separator. I understand that those options don't make much sense in this contrived example. However, I have an alias set up for rg that adds a bunch of options that I want as defaults, including --context. I (sometimes) use -l to list out files that I can pass to vim, e.g. vim $(rg "context-separator" -l).

I tried to set --context=0 when using -l – which would be an ok tradeoff for me – but it looks like multiple --context flags are not allowed.

rg … | sed '/--/d' is another potential solution, but it would break if --context-separator specified a different separator.

@okdana
Copy link
Contributor

okdana commented Nov 27, 2017

Yeah, also affects --count and --files-without-match.

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

No branches or pull requests

2 participants