3 ms·
ZSH must handle globs in some weird way? '?' is glob for one character, '-?' means "dash followed by any character", and that's what I'd expect to be matched,
by TeMPOraL 2y ago
ZSH must handle globs in some weird way?
'?' is glob for one character, '-?' means "dash followed by any character", and that's what I'd expect to be matched, and that's what my `ls` does.
- lloeki 2y ago> '-?' means "dash followed by any character" but `a` is not "dash followed by one character" so the glob does not match a `a` file? my haha nearby was wrong! I should have tested it :)
- me-vs-cat 2y agoI have a non-default option on for zsh, which is incredibly useful interactively. (Bash also has this option, but I haven't enabled it.) Normally, ls doesn't expand globs. Why did you say to try "touch a; ls -?"? What am I supposed to see from those two commands?