cli: adding -. as short option for --hidden#1680
cli: adding -. as short option for --hidden#1680marcospb19 wants to merge 1 commit intoBurntSushi:masterfrom marcospb19:hidden-flag-short-option
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 |
BurntSushi
left a comment
There was a problem hiding this comment.
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-His already taken by--with-filenamefrom the originalgrep, and-hshould always be--help.The fact is, a lot of times when searching recursively in a directory,
--hiddenis 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.