Trim21
V2EX  ›  问与答

为啥 glob 能匹配到上级目录的文件?

  •  
  •   Trim21 · May 27, 2021 · 819 views
    This topic created in 1819 days ago, the information mentioned may be changed or developed.
    ~/proj/test (master) # echo !(node_modules)**/*.ts
    ../a.ts
    
    ~/proj/test (master) # shopt|grep glob
    dotglob         off
    extglob         on
    failglob        off
    globasciiranges off
    globstar        on
    nocaseglob      off
    nullglob        off
    

    so 搜到了说是可能设置了GLOBIGNORE,但我试了一下这个变量也是空的

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5535 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 03:06 · PVG 11:06 · LAX 20:06 · JFK 23:06
    ♥ Do have faith in what you're doing.