doronbehar / pistol

General purpose file previewer designed for Ranger, Lf to make scope.sh redundant
MIT License
321 stars 7 forks source link

substitute multiple '%pistol-extra%' in one argument #58

Closed lucas-mior closed 3 years ago

lucas-mior commented 3 years ago

adresses #56 I don't think it's an elegant solution, but it should work.

doronbehar commented 3 years ago

Thanks for trying to fix this @lucas-mior . I added a test to your branch, which demonstrates the issue and it seems it's not fixed completely (run make test):

Checks substitution of multiple pistol-extra arguments without
a space between them (issue 56). The output should be:

     tests/multi-extra AxB

-------------------
tests/multi-extra %pistol-extra0%xB

Without your change to previewer.go the test fails even worse:

tests/multi-extra

So this is a good start.

lucas-mior commented 3 years ago

Weird, running make test in my machine results in

...
-------------------
Checks substitution of multiple pistol-extra arguments without
a space between them (issue 56). The output should be:

     tests/multi-extra AxB

-------------------
tests/multi-extra AxB
doronbehar commented 3 years ago

Weird, running make test in my machine results in

Weird indeed, perhaps I forgot to run make after I tested some changes.. Thanks for the fix! Could you please review the comments I added by reading your code? If you'd like to do / suggest changes please squash the commits.

lucas-mior commented 3 years ago

The comments look fine to me.