3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

zsh 5.2以降のオプション GLOB_STAR_SHORT(**.cで**/*.cと同じ展開をさせる)

Posted at

**/***になるので、ちょっとだけタイプが楽になる。

~/.zshrc
autoload -Uz is-at-least
is-at-least 5.2 && setopt glob_star_short  # **.c で **/*.c と同じ展開をする

***だと***/*と同じで、シンボリックリンクをたどるようになるらしい。

       GLOB_STAR_SHORT
              When this option is set and the default zsh-style globbing is in effect, the pattern `**/*' can be abbreviated to `**'  and  the
              pattern  `***/*'  can  be  abbreviated to ***.  Hence `**.c' finds a file ending in .c in any subdirectory, and `***.c' does the
              same while also following symbolic links.  A / immediately after the `**' or `***' forces the pattern to be treated as the unab‐
              breviated form.

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?