hugows / hf

(another) Fuzzy file finder for the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests fail on Windows.

baileyn opened this issue · comments

The default tests for runcmd_test.go fail on windows. By default hf uses cat $FILES and cat $FILES | wc -l as test commands. On Windows, cat is an alias in Powershell. When the default shell is changed to use powershell -Command instead of cmd /c, the cat command works for one file, but it will not work for multiple files.

I think now runcmd.go works on both systems.

But I have gnuwin cat installed... it will probably fail for you.

I ran the test on windows, and it passed fine. I was using the powershell terminal, but I don't think that really matters considering cmd /c is called from runCmdWithArgs,

I still testing what is the best behaviour there - use cmd /c for
everything, let the user choose (current behaviour), use heuristics to find
out what kind of programs should be called with shell, etc.

On 14 July 2015 at 13:09, Nicholas Bailey notifications@github.com wrote:

I ran the test on windows, and it passed fine. I was using the powershell
terminal, but I don't think that really matters considering "cmd /c" is
called from runCmdWithArgs,


Reply to this email directly or view it on GitHub
#5 (comment).

I would say either let the user choose the default command to be used, or check if powershell exists, and if not default down to cmd.

powershell -Command is the equivalent of cmd /c, but powershell has aliases such as ls, cat, and a few others which cmd will refuse to execute.

Dear Nicholas,
Could you be so kind to generate .exe for the rest of us who are mere Windows users w/o compiler?