Closed KES777 closed 1 year ago
Thanks for reporting this. I pushed a fix (f7pd393) for passing down --
to the command to be ran.
As for the second issue it's not possible to expand numbers after --
as those will be passed intact to the command. What you can do instead is use git-list
to expand it, e.g.: gl -- $(git-list 7)
How about gl --- 7
feature?
Triple -
will mean to process string after ---
and pass result as -- lib/Invoice/Schema/Result/Company.pm
.
This will save a lot of typing. For comparison:
gl --- 7 xx 9
gl -- $(git-list 7) xx $(git-list 9)
Interesting idea! I'm not opposed to that. It will be a bit tricky to implement though.
Something like this would work perhaps:
$ git diff git-number
diff --git git-number git-number
index 43f6637..f00e652 100755
--- git-number
+++ git-number
@@ -140,6 +140,11 @@ while (scalar @ARGV) {
last;
}
+ if ($arg eq '---') {
+ push(@args, '--');
+ next;
+ }
+
if ( $arg =~ m/^[0-9][0-9]*$/ ) {
push @args, split("\n", `git-list $arg`);
$converted=1;
Just need some unit tests and it should be good, I think.
Checked new version. Works fine. Thank you very much for fixes.
How to reproduce:
It seems
--
is lost. I expect command to look like:git log -w -b -p --ignore-blank-lines --full-history 9ce3e165f284d55503eff9b627ef3723854c53bb^ -- lib/Invoice/Schema/Result/Company.pm
Another issue here it seems that it is not possible to pass the number for
lib/Invoice/Schema/Result/Company.pm
file, eggit log -w -b -p --ignore-blank-lines --full-history 9ce3e165f284d55503eff9b627ef3723854c53bb^ -- 7
I need to pass file after
--
because this file was deleted and does not exists at current working directory, so I need to pass its name after--
.