简体   繁体   中英

How to temporarily filter out all files that don’t end by .sh in Visual Studio Code’s explorer

I would like to temporarily filter out all files that don't end by .sh in Visual Studio Code's explorer.

Is that possible? Trying to find an easy way to audit all shell scripts.

Thanks!

This is a more permanent solution:

"files.exclude": {
  "**/node_modules": true,
    "**/*.[^s]*": true,
    "**/*.s[^h]*": true,
},

setting seems to work. You will still get folders but the only files will be .sh extensions.


Alternatively, you can filter the Explorer files by, when focus is in the Explorer, typing .sh . When you are done, hover over the little highlighted .sh in the upper right corner of the Explorer view and select Clear to return to normal.

You will get only .sh* files this way, so if you extensions of .sh2 or a filename like abcd.shabc.txt they would also appear but I assume this will get you where you want to go.

with Workbench > List: Keyboard Navigation set to filter .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM