-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use --
instead of -
for arguments?
#68
Comments
Flog uses a more similar argument format to builtin vim commands. Flog arguments are not shell arguments, they are arguments for a vim command. It translates any arguments that go to That said if this issue gets support I would be willing to switch. This is just the ideas that went into how it works now. Backwards compatibility may not be something I want to do, I don't want to maintain both forever. If it ends up being easy, though, I would support both until it becomes unfavorable. |
I sort of like fugitive's way of |
Thank you very much for weighing in. We need all the feedback we can get on this issue. I should explain that for the most part, Fugitive commands correspond directly to a git command because that's just... well, what they are. Flog on the other hand is much less a direct analog for When you are passing arguments to The biggest thing is that as long as Vim cannot complete arguments in the form There definitely will be issues where people are confused why they can't specify arguments with quotes if we do this, so please weigh that against stylistic preference for double dashes. |
On Fri Jul 19, 2024 at 20:00, rbong ***@***.***> wrote:
> I sort of like fugitive's way of `:Git [whatever]` is almost always the same or very similar to `git [whatever]` on the CLI. On the other hand with `:Flog -- [whatever]` you can pretty much get the same thing I guess? But I do have to not, I run into it often enough that I want to do a `git log [something]` in Flog and type double dash options.
Thank you very much for weighing in. We need all the feedback we can get on this issue.
I should explain that for the most part, Fugitive commands correspond directly to a git command because that's just... well, what they are. Flog on the other hand is much less a direct analog for `git log` than any Fugitive command is for its corresponding Git command.
When you are passing arguments to `Flog`, you are passing arguments to a Vim command. It may translate those options to a Git command, and I might try to keep argument name parity, but it almost always is doing something extra inbetween inside Vim and it may not work exactly the same - in some cases they're implemented entirely internally.
I already realized, that `:Flog -format` is already doing `--pretty=format:` in the background so there's already some discrepancy.
The biggest thing is that as long as Vim cannot complete arguments in the form `-arg "quoted arg with spaces"`, we can probably never have complete argument parity. So be aware that when you're asking for this, you're not asking for arguments to be the exact same as `git log`, you are asking them to be a bit closer but still required to be specified in a different way.
And I did run in to this whitespace quoting issue as well. So I'd say it might make sense to just leave it as it is. It's not particularly hard to remember to use `--` for verbatim passing of parameters. And since escapes sequences like color don't pass to vim, using raw output isn't really an option in quite a few situations anyway.
There definitely will be issues where people are confused why they can't specify arguments with quotes if we do this, so please weigh that against stylistic preference for double dashes.
Agreed.
…--
36305425054
bence.ferdinandy.com
|
I would want to use
--
for arguments (which is more a conventional and standard way), for example:instead of
The reason I want this is it is more compatible with raw
git log
command so I can have the same code for generating rawgit
command lines and:Flog
commands.So it'd be nice to have all arguments coming with double dashes. For backward compatibility we could keep the single-dash arguments. Any thoughts?
The text was updated successfully, but these errors were encountered: