pss v0.33 released
October 21st, 2011 at 3:35 pmLast week I announced the first public release of pss – a tool for searching inside source code.
pss generated quite a lot of interest, and for the past week I spent a considerable portion of my hobby hacking time solving bugs and adding requested features. So today I’ve made pss version 0.33 available (also on PyPI).
Here is the list of changes for this release (the issue numbers refer to the issue tracker of pss):
- Issue #7: allow simple invocation of pss without installing, by directly passing the source directory to a Python interpreter.
- Fixed a problem with the max-count option that was broken in some cases.
- Fixed some encoding issues, and better handling of non-ASCII files when running on Python 3 (also reported in Issues #10 and #12).
- Issue #2: pss will now ignore broken symlinks (won’t list them or try to read them).
- Issue #5: When the output of pss is redirected, by default colors won’t be applied (unless forced with –color).
- Issue #6: Support -l and -L options (only show files with/without matches)
- Issue #8: When Ctrl+C is hit, print a succinct error message instead of the full stack trace.
I have an intention to keep pss well maintained and running smoothly, so if you bump into any problems or just want to suggest a cool new feature, feel free to open an issue.
Related posts:

October 27th, 2011 at 11:53
Very cool. My thanks to you Eli for making me aware of ack (and by extension pss). What would be a really cool is a pattern refactoring feature. Maybe you can one up ack and make pss contain a super sed module too?
October 27th, 2011 at 12:41
justin,
Could you be more specific? I’m not sure what you mean by “a pattern refactoring feature”.
October 28th, 2011 at 13:15
My apologies for not being clear (a lazy & mortal sin imo;). I was referring to a refactoring feature that would, like sed, substitute all occurrences of a target pattern for another given string. For example, the following could replace all Connection.* with ServiceConnection.* in a project:
pss –refactor –in-place “/Connection(.*)/ServiceConnection\1/” –type=noperl
October 28th, 2011 at 13:51
justin,
Interesting idea, I didn’t consider it. Would it be different from using
pssto find the interesting files and then pipe the file list tosedfor the replacement? Or just shorter?Anyway, feel free to add it as a feature request on the
pssbitbucket site.October 29th, 2011 at 19:35
Hey Eli,
I added a feature request to the project site. Just using
pssto pipe files tosedis fine, but it does mean we have to switch to POSIX regexes when respecifying our pattern forsed.I’ve been wondering though whether this feature goes against the Unix way of using one tool to do one job. Arguably it does; but the feature would just be so useful. Would be interested in hearing what anyone thinks.
November 20th, 2011 at 20:11
I will have to try pss – I use ack or (being somewhat older in the force
cscope. I think pss fits more with cscope than ack, but I’ll have to explore it a bit more.
November 21st, 2011 at 06:26
bryane,
I also use
cscopeoccasionally – I think the two tools are quite orthogonal.