delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/01/17/04:44:32

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=vf3
NVCkOXAF4hnIwnNeeGvN8S8cUVjyUpAioYYmIS2jbOz1uLBa4zPRehKV+NSUKgAr
6H5SXZG8TYdrbnvauvd6l6mPctbJplQkbpnb1K7QMQ9QxIZzu+39e/oVaRY9cZQn
FNKUMWFJ2/zWLdfTkeKf9DcA6TDpAN5G0X3IMaxA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; s=default; bh=fglp1GVOd
IfRd1ADkpKmLIDEKmA=; b=Dy/eGaHf0x2yOVQeMMg45hcMRQt7n6NvmCb1YnQVH
wTRG0ALdEjHsx4/nhOCnEKxWLGrRrRgI8B0GZE+tFjKux0IAm4xbZYl3FRcJo4G8
B6c9hiXmszjBev6Y2/dAfGnb8pZKB8arZ5npxcwpiyq0m1cWJZcCPb1S1qfvQV9/
aU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=1.9 required=5.0 tests=AWL,BAYES_00,FORGED_SPF_HELO,GIT_PATCH_2,KAM_ASCII_DIVIDERS,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=marco, gplv3, uname, GPLv3
X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H1qW9zErYgFFUOtTi9pgwwXDMgQXMOv45WAIU/jBD3Hs4+7eYZw4gXKUOsvtRrzoyQwRnyBpjkkxCtTManJdUO3uZM8RaHgEELR099s8Rq4GCL5PAUbONjicC4lU+dnKpFc0mmrpzOQCKggdnrw2ZK1oWlZ+AH+U815nHsnubwJzb7+ydLyUSPwANXDljwp74JCN76ZglN56nPtVufdiFweC+P6T+HuNUd5yKJYD9SqAEvQHBC9/o8Lmo1rOOIHEyv9zy5Fg2XqNip+u2dNDy0G6Sn46Ix066KtQKtZmc57yakIhBapIi7ZKZ1iCR8z2MNsgu4pDZwBvZRljjxK+EA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wxJmS1CmfdwU1gLI8l81De44t9N8RjdfoXvB2tUr9J8=; b=n8PePD43bUlKVb+g/QwIO0I+svFRvVM8ECGG2fHmsnssKpuz5BCo9n8r+6kpRdBJfadgxMb3zBhi96CUHW2tkoVApo35Wg7CVopjUZhux6ouA6CdeiQnyhH5hOOQ6pE40iIY/1vJ5/TyjkxteqrV381oZM6jgh+kvei2b2PCKlWFbv7Bt0MmK1seS93x+h0RnLw80wS/5Y57yJS2MmJtf2VQ2vj6e4wsBTzYl8jK/HLG8h+tNWFV/abf+TM91TVtLa24lqNdjpZZAGv4NHfiNp7PvjhsUWjRICi2u3lnyO4MI8hv7g11/zXiyftLuceeyAlV+P8Eku9YZX46XF+VXQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=continental-corporation.com; dmarc=pass action=none header.from=continental-corporation.com; dkim=pass header.d=continental-corporation.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=continental.onmicrosoft.com; s=selector2-continental-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wxJmS1CmfdwU1gLI8l81De44t9N8RjdfoXvB2tUr9J8=; b=cfY+bpkvGRFdqEPGPP6kj7dhmMsISpXz3JoIDTjUJDDr56UG9Guymno2Bz6wczngDyJM6L0rcAwW3hACwL/KQEno4OvTvtJ69HxCwVenB3+kT0iER+qZEjbOZJANR0tKCbxN4+uRSQG3onI6H8o0uZzGRnJUZDfO2oY0oNjH4c4=
From: "Trosi, Marco" <marco DOT trosi AT continental-corporation DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: configured FZF call fails since update from Cygwin 3.0.7 to 3.1.2
Date: Fri, 17 Jan 2020 09:43:32 +0000
Message-ID: <AM0PR03MB6228AAC87663C0019B9ECED7BA310@AM0PR03MB6228.eurprd03.prod.outlook.com>
authentication-results: spf=none (sender IP is ) smtp.mailfrom=marco DOT trosi AT continental-corporation DOT com;
x-ms-oob-tlc-oobclassifiers: OLM:10000;
received-spf: None (protection.outlook.com: continental-corporation.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-ms-exchange-transport-forked: True
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: aPMGS87WAh+D86Bs8OFQjkIUcQN6xAJGEJ9/sdh1Mwtm+La1OOFkEFsvdsnCnIWuGjpiAr9QNJqPZXBoZ6eLhw==
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 00H9iDNx007511

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019