Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

There's no way to exclude paths from a search #149

Closed
atom/scandal
#17

Description

@mattbasta

When searching, filters can be specified. However, there's no way to exclude paths from the search.

E.g.: *.js, -*.min.js cannot be used to exclude minified files from a search of JS

Activity

  1. benogle commented on Mar 7, 2014

    @benogle
    Contributor

    You can try the ! char. We use minimatch.

  2. TrevorSayre commented on Mar 12, 2014

    @TrevorSayre

    Something like *.js, !*.min.js does not work
    Using just !*.min.js actually only searches .min.js files (inverse of what you might expect)
    Unsure how to search *.js files but not *.min.js files

  3. dbkaplun commented on Mar 19, 2014

    @dbkaplun

    Searching for require in !node_modules/* returns no results. Am I doing it wrong?

  4. jaikdean commented on Apr 8, 2014

    @jaikdean

    I am seeing the same buggy behaviour. If I do a search for something with the path pattern of "!directory/to/ignore" it search only in that directory rather than ignoring it and searching everything else.

  5. noahrc commented on Apr 10, 2014

    @noahrc

    '!' also doesn't exclude a file or directory for me, and using it multiple times makes no difference.

  6. probablycorey commented on Apr 10, 2014

    @probablycorey

    Using the ! syntax to negate a search won't work right now. The problem is from this line https://github.com/atom/scandal/blob/master/src/path-filter.coffee#L47.

    But I don't see a solution around it other than fixing how scandal handles directory/file filtering.

  7. probablycorey commented on Apr 10, 2014

    @probablycorey

    Moving from bug to enhancement.

  8. 102 remaining items

  9. leongaban commented on Feb 2, 2016

    @leongaban

    Ok I finally got this working, had to add .sass-cache into my config.cson file, now when I fuzzy search I don't get .scssc files

     core:
        closeEmptyWindows: false
        ignoredNames: [
          ".scssc"
          ".sass-cache"
          ".git"
          ".hg"
          ".svn"
          ".DS_Store"
          "Thumbs.db"
          "node_modules"
        ]
        themes: [
          "atom-material-ui"
          "atom-material-syntax"
        ]
    
  10. konstantinmagg commented on Mar 2, 2016

    @konstantinmagg

    +1 Would be great to ignore folters (e.g. 'bower_components' or 'node_modules') in the search bar.

    @leongaban your solution worked for me, too. thx ;)

  11. ocssor commented on Mar 2, 2016

    @ocssor

    Right Click Folder -> Search in directory

    Still searches in '.svn' despite that being in ignored names (both in core settings view and in config.cson).

  12. akmur commented on Mar 2, 2016

    @akmur

    Thanks @leongaban

  13. MichaelJCole commented on Mar 2, 2016

    @MichaelJCole

    FYI, this bug is closed. Posting here doesn't help fix your issue, and emails a bunch of people who can't help. For best results, please open a new bug. Thanks!

  14. MohammedAl-Mahdawi commented on Jun 23, 2016

    @MohammedAl-Mahdawi

    In order to search in a folder within my project folder and ignore the .git folder within it, I did the following
    selection_108
    Just added , !.git after my folder path.

  15. stringaro-leo commented on Jan 25, 2017

    @stringaro-leo

    this works for me: !**/node_modules/**,!**/bower_components/**

  16. findsje commented on Apr 10, 2017

    @findsje

    Thanks, this worked for me. Was giving up on this! **/*.html was what I needed.

  17. eugenealegiojo commented on Jun 17, 2017

    @eugenealegiojo

    Nice! This works for me as well: !*.min.js

  18. mrahulreddy commented on Oct 20, 2017

    @mrahulreddy

    This works for me
    !node_modules

  19. jorgeorpinel commented on Mar 6, 2018

    @jorgeorpinel

    Not working at all for me ): The "Exclude VCS Ignored Paths" option also not working.

    image

  20. jrial commented on Jul 13, 2018

    @jrial

    @jorgeorpinel could it be that your file was not saved at that time? If so, see #647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions