Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • I'm getting bitten by this more often that I'd like to admit; is there a way, in ZSH, to default globbing to (n)? Commented Feb 1, 2021 at 18:49
  • 1
    @Michaël setopt numeric_glob_sort Commented Feb 1, 2021 at 21:38
  • where does the echo *(n) come from? Why does it sort file names with numbers the right way instead of ls? I want to use it in a script: files=$(echo *.pdf(n)) and get a syntax error. Commented Mar 4 at 19:59
  • 1
    @Timo It's a glob qualifier. It's specific to zsh. Commented Mar 5 at 10:01