-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cli: adding -. as short option for --hidden #1680
Conversation
Hey, thanks for the great software, I'll understand if think that this flag is weird, it was also weird for me at first glance, so no hard feelings if you just decline it 😃 . Also, I'm not sure if |
I like the cleverness of this, but I'm not sure how I feel about it. It pushes my weirdness budget, personally. I am potentially in favor of having a short flag for As far as portable, @okdana What are your thoughts on this? |
I think I don't know. There's definitely a logic to it, but it's weird. And it sets a precedent. |
@BurntSushi and @okdana, thanks for the responses!
I assume that everything will work with
I personally think that offering a short flag as an extra option of usage will always be better than not offering a short flag option at all, if It would be even better if someone could figure out a better option that could satisfy all the user base, however I'm out of ideas (I would suggest something with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm still a little unsure, I decided to accept this. I like the connection between -.
and hidden files, even though it is a bit Unixy.
This is somewhat non-standard, but it seems nice on the surface: short flag names are in short supply, --hidden is probably somewhat common and -. has an obvious connection with how hidden files are named on Unix. Closes #1680
This is somewhat non-standard, but it seems nice on the surface: short flag names are in short supply, --hidden is probably somewhat common and -. has an obvious connection with how hidden files are named on Unix. Closes #1680
This is somewhat non-standard, but it seems nice on the surface: short flag names are in short supply, --hidden is probably somewhat common and -. has an obvious connection with how hidden files are named on Unix. Closes #1680
There was no short option for
--hidden
, I assume because-H
is already taken by--with-filename
from the originalgrep
, and-h
should always be--help
.The fact is, a lot of times when searching recursively in a directory,
--hidden
is needed to show files that start with an.
(dot).So doesn't it make sense to use a dot for the short flag?
rg -. PATTERN
.The only software I'm aware that uses
-.
isfeh
, however there seems to be no semantic relation with the dot itself, in contrast withripgrep
's.