Comments (4)
I think #4 offers a more generic approach to this, no?
from pss.
#4 is definitely similar and solves the problem to "add these custom files into a list of files that pss looks by default" that I mentioned in the end of the description. It doesn't make it much easier to restrict search only to certain custom extension. Compare these possibilities:
pss -aG '.*\.robot' pattern # works now
pss -E robot pattern # proposed by this issue
pss --type-add robot=.robot --robot pattern # proposed by issue #4
I'd probably keep on using the first option even if #4 was implemented because using it so verbose. Needing to type robot
three times is a bit too much.
from pss.
I think I already laid this philosophy down somewhere, but can't find it now, so I'll repeat at least partially: it is not my goal to build any option under the sun into pss. Anyone who's looked at its code noticed that the flag parsing code is already super complicated because of the sheer amount of options supported.
I personally have wrapper scripts around pss that just invoke it with extra arguments for special situations - I think this can work for anyone. Then verbosity is not a real problem. In this respect the --type-add
proposal is superior because if your pss
wrapper actually calls:
pss --type-add robot=.robot "$@"
Then you have your enhanced pss, all the rest works just fine.
What I could consider (I remember someone proposed implementing it but then lost interest) is supporting configuration files that would make specifying lots of options easier. pss could then be pointed to such configuration files, so you'd have:
pss --config <my_pss_config> $@
In your wrapper script. Or multiple wrapper scripts with multiple configs.
from pss.
Fair enough.
from pss.
Related Issues (20)
- Return values HOT 9
- Add "searchindex.js" to the default exclude list HOT 1
- pattern "->" seems to cause an issue HOT 1
- Enhancement suggestion - provide file list file as [files] source HOT 3
- enhancment: add support for multi-line search HOT 1
- Enhancement request: Support in-plce replace a-la sed HOT 4
- Support omitting line numbers in output HOT 1
- Differences with silver-searcher and rgrep HOT 1
- Pack as a snap HOT 2
- Syntax aware searcher HOT 2
- Add node_modules to directories ignored by default
- Command line parser doesn't support multiple occurrences of --include-pattern or --exclude-pattern HOT 1
- The optparse library is deprecated since Python v3.2 HOT 2
- Tests do not run under Python3.6 HOT 1
- pss --smart-case problem with 143 HOT 1
- Drop support for Python 2 HOT 1
- Search from `.robot` and `.resource` files by default HOT 9
- by default line number is not colored HOT 2
- Easily iterate over and search git branches HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pss.