far

How to skip searching directory by mask in Far Manager


I have Git repository with nested submodules. All of them have .git folders. I would like to search files with ignoring these git folders, because it takes much more time than without them.

I have tried to use filters (Alt+F7), but it doesn't work or I do it wrong.


Solution

  • I had the same question ( https://forum.farmanager.com/viewtopic.php?p=150995 ).

    Step by step solution:

    
       ╔══════════════════════════════ Find file ═══════════════════════════════╗
       ║ A file mask or several file masks:                                     ║
       ║ *.*                                                                   ↓║
       ╟────────────────────────────────────────────────────────────────────────╢
       ║ Containing text:                                                       ║
       ║                                                                       ↓║
       ║ Using code page:                                                       ║
       ║ Automatic detection                                                   ↓║
       ╟───────────────────────────────────┬────────────────────────────────────╢
       ║ [ ] Case sensitive                │ [ ] Search in archives             ║
       ║ [ ] Whole words                   │ [x] Search for folders             ║
       ║ [ ] Search for hex                │ [x] Search in symbolic links       ║
       ║ [ ] Not containing                │ [ ] Search in alternate streams    ║
       ╟───────────────────────────────────┴────────────────────────────────────╢
       ║ Select search area:                                                    ║
       ║ From the current folder         ↓   [x] Use filter                     ║
       ╟────────────────────────────────────────────────────────────────────────╢
       ║         { Find } [ Drive ] [ Filter ] [ Advanced ] [ Cancel ]          ║
       ╚════════════════════════════════════════════════════════════════════════╝
    
    
                             ╔════════ Attributes ════════╗
                             ║ [?] Read only              ║
       ╔══════════════════   ║ [?] Archive                ║   ══════════════════╗
       ║ A file mask or se   ║ [?] Hidden                 ║                     ║
                             ║ [?] System                 ║
       ╔══════════════════   ║ [?] Compressed             ║   ══════════════════╗
       ║ Name: Git folder    ║ [?] Encrypted              ║                    ↓║
       ╟──────────────────   ║ [?] Not indexed            ║   ──────────────────╢
       ║ [x] Mask: .git      ║ [x] Directory              ║                    ↓║
       ╟──────────────────   ║ [?] Sparse                 ║   ──────────────────╢
       ║ [ ] Size:           ║ [?] Temporary              ║           [ Blank ] ║
       ║   >=                ║ [?] Offline                ║   00:00:00,000+0000 ║
       ║   <=                ║ [?] Reparse point          ║   00:00:00,000+0000 ║
       ╟──────────────────   ║ [?] Virtual                ║   ──────────────────╢
       ║ [x] Attributes [    ║ [?] Integrity stream       ║    one hardlink     ║
       ╟──────────────────   ║ [?] No scrub data          ║   ──────────────────╢
       ║                     ║ [?] Pinned                 ║                     ║
       ╚══════════════════   ║ [?] Unpinned               ║   ══════════════════╝
                             ║ [?] Recall on open         ║
       ║         { Find }    ║ [?] Recall on data access  ║   Cancel ]          ║
       ╚══════════════════   ║ [?] Strictly sequential    ║   ══════════════════╝
                             ╟────────────────────────────╢
                             ║     { OK } [ Cancel ]      ║
                             ╚════════════════════════════╝
    
    
      ╔═══════════════════════ Filters menu ═══════════════════════╗
      ║- Git folder            │ +D          ... │ .git            ║
      ╟────────────────────────┼─────────────────┼─────────────────╢
      ║  0. Folders            │ +D          ... │                 ║
      ╚═ +,-,Space,I,X,BS,Shift+BS,Ins,Del,F4,F5,Ctrl+Up,Ctrl+Dn ══╝
    

    Yegor's filters from the linked post:

    ╔═══════════════════════════════════ Filters menu ════════════════════════════════════╗
    ║- Visual Studio Build F │ ..............D+.............. ... │ obj,bin               ║
    ║  Temporary Files       │ ..............D-.............. ... │ <bak>                 ║
    ║- NuGet and NodeJs Pack │ ..............D+.............. ... │ packages,node_modules ║
    ║- Source Repositories   │ ..............D+.............. ... │ .svn,.hg,.git         ║
    ╟────────────────────────┼────────────────────────────────────┼───────────────────────╢
    ║  0. Folders            │ ..............D+.............. ... │                       ║
    ║  1. Panel file type    │ ..............D-.............. ... │ *.                    ║
    ║  2. Panel file type    │ ..............D-.............. ... │ *.7z                  ║
    ║  3. Panel file type    │ ..............D-.............. ... │ *.jpg                 ║
    ║  4. Panel file type    │ ..............D-.............. ... │ *.mp4                 ║
    ║  5. Panel file type    │ ..............D-.............. ... │ *.pdf                 ║
    ║  6. Panel file type    │ ..............D-.............. ... │ *.xlsx                ║
    ║  7. Panel file type    │ ..............D-.............. ... │ *.zip                 ║
    ╚══════════════ +,-,Space,I,X,BS,Shift+BS,Ins,Del,F4,F5,Ctrl+Up,Ctrl+Dn ══════════════╝