-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easier support for custom file extensions #23
Comments
I think #4 offers a more generic approach to this, no? |
#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:
I'd probably keep on using the first option even if #4 was implemented because using it so verbose. Needing to type |
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
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:
In your wrapper script. Or multiple wrapper scripts with multiple configs. |
Fair enough. |
I'm working with custom file extension
.robot
(test data files for http://robotframework.org) and by default pss doesn't, as designed, look into them. I can simply use-a
to look everywhere, but if I want to look only to those files I need to use-aG '.*\.robot'
. Not so nice if you are using pss with such files a lot. There are obviously many other custom file types too, for example,.tmpl
is mentioned issue #1 comments.It would be convenient if there was an option to easily limit searching to a certain file extension. Basically I would like to use something like
-E robot
instead of-aG '.*\.robot'
. Notice that I would like both to avoid writing a regexp when I don't really need it (robot
vs.'.*\.robot'
) and would like-a
to be implied. (I was rather surprised I needed to use it with-G
, might be a good idea to mention that in its docs.)I'm willing to implement this functionality myself. Mainly wanted to submit an issue first to hear what you think about it before starting to create a pull request. Should also decide what is a good short option for this usage and is long option needed too.
I'm also looking for a way to add these custom files into a list of files that pss looks by default. That's definitely a topic for a separate issue, most likely my needs are already covered by #1.
The text was updated successfully, but these errors were encountered: