all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: help-gnu-emacs@gnu.org
Subject: Re: counsel-dired-jump error "find: paths must precede expression:"
Date: Fri, 19 Jan 2018 11:11:07 +0100	[thread overview]
Message-ID: <20180119101107.GD7809@tuxteam.de> (raw)
In-Reply-To: <87lggu9o3s.fsf@gmail.com>

-----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-----



  reply	other threads:[~2018-01-19 10:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18  2:39 counsel-dired-jump error "find: paths must precede expression:" John Magolske
2018-01-18  6:46 ` Yuri Khan
2018-01-19  8:13   ` John Magolske
2018-01-19  9:47     ` Robert Pluim
2018-01-19 10:11       ` tomas [this message]
2018-01-19 10:07     ` Eli Zaretskii

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=20180119101107.GD7809@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.