zsh-users
 help / color / mirror / code / Atom feed
* glob executable vs. non executable
@ 2022-10-27 15:41 Ray Andrews
  2022-10-27 20:02 ` Lawrence Velázquez
  0 siblings, 1 reply; 5+ messages in thread
From: Ray Andrews @ 2022-10-27 15:41 UTC (permalink / raw)
  To: Zsh Users

I'm trying to break all 'real' files -- ignoring those weird 'special' 
files that linux makes -- into two groups: executables, which I take to 
be x-scripts, binaries and symlinks, vs. everything else, basically 
unx-scripts and plain text files.

$  eval "all_unx=( (#i)$1(N.^*) )"
... that seems to work for the later, the dot excludes symlinks but 
includes executables so: '^*' excludes those.  But what's the converse?  
I'm wanting:

$   eval "all_x=( (#i)$1(N*@) )"

... but it's a bad pattern. I can append two searches, one for '*' the 
other for '@' but I'm betting there's a clean way of doing it.  
Basically real files that whence is interested in vs. real files she is 
not interested in.  Given that these glob qualifiers have a quite 
astonishing power, it seems puzzling that ... well, I shouldn't presume 
it isn't already there, but in my mind:

$   eval "all_matches=( (#i)$1(NX )"

... anything whence finds, anything executable that is a file. Oh, and 
while I'm imagining new glob qualifiers, how about 'T': any text file, 
(un)executable script or just a cookie recipe but made of readable text.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-27 23:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 15:41 glob executable vs. non executable Ray Andrews
2022-10-27 20:02 ` Lawrence Velázquez
2022-10-27 21:44   ` Ray Andrews
2022-10-27 23:19     ` Lawrence Velázquez
2022-10-27 23:39       ` Ray Andrews

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).