[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: counsel-dired-jump error "find: paths must precede expression:"
From: |
tomas |
Subject: |
Re: counsel-dired-jump error "find: paths must precede expression:" |
Date: |
Fri, 19 Jan 2018 11:11:07 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, Jan 19, 2018 at 10:47:35AM +0100, Robert Pluim wrote:
> John Magolske <listmail@b79.net> writes:
>
> > looking into this further, I found a quoted wildcard resolves the issue:
> >
> > (shell-command-to-string
> > (concat find-program " -path './*' -type d -not -path '*\/.git*'"))
> >
> > Seems to behave pretty much the same, except that all the directory
> > file-paths displayed in the minibuffer are now preceded with a ./
>
> What's wrong with using "find ." instead of "find './*'"?
They are at least different: I don't know whether that is relevant here.
With "find .", the start set is the current directory; it would also
find files and subdirs of "." whose name starts with a dot.
With "find ./*", the shell would have a go at expanding ./* into
the list of entries of the current directory: find's start set would
be that list, as expanded by the shell. By default[1], that expansion
excludes entries whose name start with a dot (thus the -not -path ...
up there seems superfluous).
Cheers
[1] But cf "shopt dotglob" for bash, for example. Shells tend to
vary in this department. Note that the shell expansion of
./* can vary even more wildly, cf. bash's "set noglob".
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlphxDsACgkQBcgs9XrR2kaGJwCfY+3Jf3ScGiLDVnY0nyUtdaMd
MfMAn2zVmOgsALLgwoCQwzSwR0syWYwc
=2ZOs
-----END PGP SIGNATURE-----