Re: (#i) curiosity
Ray Andrews <[email protected]> Thu, 9 Apr 2026 13:40:29 -0700
| Newsgroups | gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
On 2026-04-09 13:20, Mark J. Reed wrote: > > > So what happens if you run ls with no arguments? It displays the > current directory. And if you specify the -d option telling it to list > directories themselves instead of their contents, that looks like ".". Bingo! I get it: '(#i)zzz' returns nothing to 'ls' and just as you say, I end up with the directory. Whereas 'zzz' returns 'zzz' to 'ls' which it dutifully reports as not existing, and because it's not a glob, 'nullglob' doesn't interfere. Makes me wonder ... would 'nullfile' be a thing? Same logic but pertaining to files. > > Really, I don't know why you're using ls to play with globs; it just > confuses the issue. Just use echo to see what's there. You only need > to pass the names to ls if you want more information than that the > files exist, like whether it's a directory or how big it is or the > permissions or something. Yeah, I do want an 'ls' listing, my wrapper just massages the way it works and how it displays: 1 /aWorking/Zsh/Source/Wk 4 % l test\ * LISTING of "test\ *": All file types, INsensitive. Sorting oldest on top by: Mod. Time: 0 [26-04-04--09:00] test a 0 [26-04-04--09:03] test b Items found: 2 Total bytes in directory "/aWorking/Zsh/Source/Wk": 1.9M Total including subdirs: 69M ... I cut out all the permissions stuff cuz I own my whole computer, I have a preferred time string, I filter directories in or out ... and so on. But it's 'ls' under the hood. So Mark, should that option be on or off as a basic configuration? I know there are some options that are almost always used and others that are only for exotic situations. > > -- > Mark J. Reed <[email protected]>