From: "Trosi, Marco" <marco.trosi@continental-corporation.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: configured FZF call fails since update from Cygwin 3.0.7 to 3.1.2
Date: Fri, 17 Jan 2020 09:43:00 -0000 [thread overview]
Message-ID: <AM0PR03MB6228AAC87663C0019B9ECED7BA310@AM0PR03MB6228.eurprd03.prod.outlook.com> (raw)
Hello everyone and a happy new year,
I updated recently Cygwin from 3.0.7 to 3.1.2, and now when I run "fzf" the following happens.
--- commandline call that fails --------------------------------------------
~ >> fzf
Traceback (most recent call last):
4: from /usr/bin/fzf:1347:in `<main>'
3: from /usr/bin/fzf:309:in `start'
2: from /usr/bin/fzf:1157:in `start_loop'
1: from /usr/bin/fzf:929:in `get_input'
/usr/bin/fzf:929:in `getc': No such process @ io_fillbuf - fd:11 /dev/tty (Errno::ESRCH)
--- end of commandline call that fails -------------------------------------
But it is important to understand that I don't use the default "find" for FZF.
Initially I wanted to use "fd", but "fd" is not available on Cygwin, so I use the Windows version of "fd".
I changed the FZF settings to ...
export FZF_DEFAULT_COMMAND='fd --type f'
... which works fine, still today.
But as I didn't like the Windows path format, I had the idea to run the "fd" output through "cygpath".
So I wrote a little wrapper script, named "fdc", to get Cygwin paths.
--- script named fdc -------------------------------------------------------
#!/usr/bin/bash
fd "$@" -X $(cygpath -aw $(which cygpath))
--- end of script named fdc ------------------------------------------------
and I changed my FZF settings in my bashrc accordingly ...
export FZF_DEFAULT_COMMAND='fdc --type f'
The "-X" executes a command, in this case "cygpath", for every found file.
Everything worked until I updated to Cygwin 3.1.2.
So I started to investigate to narrow down the problem.
FZF works with "fd" and with "find", so I thought it's connected to my "fdc" script.
I ran the command directly on commandline and it still works as usual.
Then I tried different variants in the script and directly on commandline.
Here the variants I tried.
--- script named fdc -------------------------------------------------------
#!/usr/bin/bash
fd "$@" -X $(cygpath -aw $(which cygpath))
#fd "$@" -X 'D:\Tools\cygwin\bin\cygpath.exe'
#fd "$@"
#fd -X 'D:\Tools\cygwin\bin\cygpath.exe'
--- end of script named fdc ------------------------------------------------
Still fails with "fdc".
Then I thought it could be the parameter passed to "fd" through "fdc",
so I also removed "--type f" from the settings.
--- FZF settings in bashrc -------------------------------------------------
export FZF_DEFAULT_COMMAND='fdc --type f' # fails
#export FZF_DEFAULT_COMMAND='fdc' # fails
#export FZF_DEFAULT_COMMAND='fd' # works
--- end of FZF settings in bashrc ------------------------------------------
Conclusion is that everything works on it's own (fd, fdc, unconfigured FZF, FZF configured with "fd"),
but when I configure FZF to use my "fdc" script it fails since the update, which wasn't the case with Cygwin 3.0.7.
For a brief moment the output is visible on screen, but it's so fast that I can't see if it is still with Windows paths
or Cygwin paths. I think it's the output due to the length on screen.
Unfortunately I can't give you the "cygcheck" output, but here some tool versions.
If you need specific information from the "cygcheck" output, then I can check them and decide if I can give them out.
--- tool versions ----------------------------------------------------------
~ >> fzf --version
fzf 0.8.9 (Dec 24, 2014)
~ >> fd --version
fd 7.3.0
~ >> mintty --version
mintty 3.1.0 (x86_64-pc-cygwin)
© 2013/2019 Andy Koppe / Thomas Wolff
License GPLv3+: GNU GPL version 3 or later
There is no warranty, to the extent permitted by law.
~ >> uname -a
CYGWIN_NT-10.0 NUL7231W 3.1.2(0.340/5/3) 2019-12-21 15:25 x86_64 Cygwin
--- end of tool versions ---------------------------------------------------
Have a great day,
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next reply other threads:[~2020-01-17 9:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 9:43 Trosi, Marco [this message]
2020-01-17 19:30 ` Adam Dinwoodie
[not found] ` <VI1PR03MB6239E12934D22AE0DBEEFF5DBA0C0@VI1PR03MB6239.eurprd03.prod.outlook.com>
2020-01-27 17:31 ` Adam Dinwoodie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM0PR03MB6228AAC87663C0019B9ECED7BA310@AM0PR03MB6228.eurprd03.prod.outlook.com \
--to=marco.trosi@continental-corporation.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).