gash-utils & fzf conflict

  • Done
  • quality assurance status badge
Details
4 participants
  • Blake Shaw
  • Maxime Devos
  • Tobias Geerinckx-Rice
  • Timothy Sample
Owner
unassigned
Submitted by
Blake Shaw
Severity
normal
B
B
Blake Shaw wrote on 8 Dec 2021 12:23
(address . bug-guix@gnu.org)
87czm7cpd3.fsf@nonconstructivism.com
Hello,

Gash-utils causes fzf to fail.

After installing gash-utils, attempting `bash5.0$ fzf` produces:
```
[Command failed: set -o pipefail; command find -L . -mindepth 1 \( -path '*/\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \) -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-]
```

Uninstalling gash-utils removes the problem.

Best,
Blake
M
M
Maxime Devos wrote on 8 Dec 2021 18:30
c76376eb11dbe81a7ff0f1dc970e56599d3a21a6.camel@telenet.be
Blake Shaw via Bug reports for GNU Guix schreef op wo 08-12-2021 om
18:23 [+0700]:
Toggle quote (15 lines)
>
> Hello,
>
> Gash-utils causes fzf to fail.
>
> After installing gash-utils, attempting `bash5.0$ fzf` produces:
> ```
> [Command failed: set -o pipefail; command find -L . -mindepth 1 \( -
> path '*/\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype
> 'devtmpfs' -o -fstype 'proc' \) -prune -o -type f -print -o -type l -
> print 2> /dev/null | cut -b3-]
> ```
>
> Uninstalling gash-utils removes the problem.

Seems like 'coreutils' (or 'coreutils-minimal'?) should be added to the
wrap-program & inputs in the package definition of 'fzf' (untested),
and bin/fzf should be wrapped as well.

Or maybe it's not the fzf that is problematic, but the bash
completions.

Greetings,
Maxime.
T
T
Tobias Geerinckx-Rice wrote on 8 Dec 2021 18:14
(name . Blake Shaw)(address . blake@nonconstructivism.com)
87k0gfuhke.fsf@nckx
Blake,

Toggle quote (2 lines)
> Command failed: […] command find

This isn't ‘really’ a bug: fzf invokes whichever find(1)
executable happens to be in $PATH at run time, and reasonably
expects it to support the POSIX ‘-L’ option.

It also willfully tries to hide any useful error messages:

Toggle quote (2 lines)
> 2> /dev/null

…maybe that's what makes Rust so safe?

gash-utils doesn't implement find -L, so failure is to be
expected. As you discovered the fix is as simple as uninstalling
gash-utils, and possibly using it in a Guix environment if you
really need it.

I don't think installing gash-utils globally into your main
profile is a good idea!

Since find(1) is such a key requirement of fzf, it makes sense to
treat it as a fixed input in this case and keep a reference to
findutils' in a wrapper.

Done in commit 9bac41c2b8e7be5ab713402591ceeb32c635c214.

Thanks!

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYbDskQ0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15weABAMMq7QuJaTL6v6Xt18gPxI5fJI5c9jwYZvRkJBwl
afreAQCDxOwjRV4mKI1rAXI0TzqS+RQZnNovo7BqMgJm5HSjBA==
=HG17
-----END PGP SIGNATURE-----

B
B
Blake Shaw wrote on 9 Dec 2021 06:29
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)
87ee6mmjmd.fsf@nonconstructivism.com
Tobias Geerinckx-Rice <me@tobias.gr> writes:

got it, thanks!

--
“In girum imus nocte et consumimur igni”
T
T
Timothy Sample wrote on 11 Dec 2021 17:12
(address . 52372@debbugs.gnu.org)
87r1ajm87j.fsf@ngyro.com
Hi Blake and Tobias,

Tobias Geerinckx-Rice via Bug reports for GNU Guix <bug-guix@gnu.org>
writes:

Toggle quote (7 lines)
> gash-utils doesn't implement find -L, so failure is to be expected.
> As you discovered the fix is as simple as uninstalling gash-utils, and
> possibly using it in a Guix environment if you really need it.
>
> I don't think installing gash-utils globally into your main profile is
> a good idea!

Definitely not! Gash-Utils is very much pre-alpha software, and I don’t
really intend for those utilities to be useful beyond bootstrapping
their fully-featured GNU cousins. Ideally there would be a
bootstrapping version of Gash-Utils that installs the utilities, and a
regular version that just has Scheme interfaces. To date, it has felt a
little premature to bother with that.

However, if you find the Scheme interfaces from Gash-Utils useful, I’m
happy to make accommodations. Right now, I think that Guilers either
write their own utilities like ‘find-files’ or they copy them out of
Guix’s ‘(guix build utils)’ module (I tend to do the latter). It would
be nice if Gash-Utils could cover this use case and be a bit like
Python’s ‘shutil’, allowing a smoother transition from shell scripting
skills to Guile scripting skills.


-- Tim
?
Your comment

This issue is archived.

To comment on this conversation send an email to 52372@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 52372
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch