From: Felipe Contreras <hidden> Date: 2016-06-15 22:53:34
All other options that accept an argument are completed this way, plus,
the '--foo bar' format doesn't seem to work correctly at the moment.
Signed-off-by: Felipe Contreras <redacted>
---
contrib/completion/git-completion.bash | 2 +-
t/t9902-completion.sh | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Thanks.
"git --exec-path" means to print the name of the directory where git
stores its subcommands and other helpers. I have no thoughts either
way about whether a user typing
git --exec-p<TAB>
is more likely to be asking for the current exec-path or intending to
override it.
Hope that helps,
Jonathan
Thanks.
"git --exec-path" means to print the name of the directory where git
stores its subcommands and other helpers. I have no thoughts either
way about whether a user typing
git --exec-p<TAB>
is more likely to be asking for the current exec-path or intending to
override it.
In other words, how about something like this? Tests left as an exercise
to the interested reader.
-- >8 --
Subject: completion: do not add trailing space when completing --exec-path
--exec-path looks like to the completion script like an unambiguous
successful completion script, but it is wrong. The user could be
trying to do
git --exec-path; # print name of helper directory
or
git --exec-path=/path/to/alternative/helper/dir <subcommand>
so the most helpful thing to do is to leave out the trailing space and
leave it to the operator to type an equal sign or carriage return
according to the situation.
Reported-by: Felipe Contreras <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
contrib/completion/git-completion.bash | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:53:34
Jonathan Nieder wrote:
In other words, how about something like this? Tests left as an exercise
to the interested reader.
... and here's a simpler way to spell it.
-- >8 --
Subject: completion: do not add trailing space when completing --exec-path
--exec-path looks like to the completion script like an unambiguous
successful completion, but it is wrong. The user could be trying to
do
git --exec-path; # print name of helper directory
or
git --exec-path=/path/to/alternative/helper/dir <subcommand>
so the most helpful thing to do is to leave out the trailing space and
leave it to the operator to type an equal sign or carriage return
according to the situation.
Reported-by: Felipe Contreras <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
contrib/completion/git-completion.bash | 1 +
1 file changed, 1 insertion(+)
From: Felipe Contreras <hidden> Date: 2016-06-15 22:53:35
On Fri, Apr 13, 2012 at 9:30 PM, Jonathan Nieder [off-list ref] wrote:
quoted hunk
Jonathan Nieder wrote:
quoted
In other words, how about something like this? Tests left as an exercise
to the interested reader.
... and here's a simpler way to spell it.
-- >8 --
Subject: completion: do not add trailing space when completing --exec-path
--exec-path looks like to the completion script like an unambiguous
successful completion, but it is wrong. The user could be trying to
do
git --exec-path; # print name of helper directory
or
git --exec-path=/path/to/alternative/helper/dir <subcommand>
so the most helpful thing to do is to leave out the trailing space and
leave it to the operator to type an equal sign or carriage return
according to the situation.
Reported-by: Felipe Contreras <redacted>
Signed-off-by: Jonathan Nieder <redacted>
---
contrib/completion/git-completion.bash | 1 +
1 file changed, 1 insertion(+)
I don't understand, the commit message doesn't match what the patch
actually does. In fact, this is the exact patch I sent, is it not?
--
Felipe Contreras
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:53:35
Felipe Contreras wrote:
I don't understand, the commit message doesn't match what the patch
actually does.
Try it, I guess? At least for me,
git --exec-p<TAB>
completes to
git --exec-path <cursor here>
before the patch, and to
git --exec-path<cursor here>
after the patch. Which is different from your original patch.
Cheers,
Jonathan
From: Felipe Contreras <hidden> Date: 2016-06-15 22:53:35
On Sat, Apr 14, 2012 at 2:37 AM, Jonathan Nieder [off-list ref] wrote:
Felipe Contreras wrote:
quoted
I don't understand, the commit message doesn't match what the patch
actually does.
Try it, I guess? At least for me,
git --exec-p<TAB>
completes to
git --exec-path <cursor here>
before the patch, and to
git --exec-path<cursor here>
after the patch. Which is different from your original patch.
Ah, it doesn't remove the current line, it just adds a new one. I'm
not sure how the completion results show up, but I guess it's better
than the alternatives.
--
Felipe Contreras