You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
procs has a well-developed and consistent search logic that covers many use cases. Though, it is not rare when "grepping" may be more familiar and convenient. But because of watching mode and headers, grep is not suitable.
The idea is to add new regex filtering mode, leave current numeric/textual search as is. The reasons are:
Regexes may be easier to write. As I said, for those who often "greps" logs (for instance) regexes are familiar, powerful and flexible way of filtering. And procs output is very similar to logs. I've come to this when I tried to watch for spawning and killing instances of two binaries while messing with processed like man or emacs which has same strings in command lines. A lot of --and and --or options plus adding spaces did the trick but it took some time. And here I thought "It would be nice to did the same with a simple regex"
Regexes are flexible. For instance, watching for some processes by state and name could be tricky but (assuming the string we're testing with regex is columns joined with space) I can easily write something like ( S .*Rambox| D .*firefox). Currently I need to check my config for Exact or Partial and think about --and and --or priorities.
Of course, it is opinion-based, but for most complex cases regexes are shorter and more predictable comparing to combination of logical conditions.
Desired implementation:
Switching modes options: --text (current search mode), --regex (regex mode) and --smart (regex autodetection by specific patterns, like | (…), * ? etc)
In regex mode, instead if [KEYWORD]…, arguments there is a single ` argument
Interactive regex-based filtering in watch mode (as for me, this feature can save a lot of time for a complex filtering cases)
The text was updated successfully, but these errors were encountered:
procs
has a well-developed and consistent search logic that covers many use cases. Though, it is not rare when "grepping" may be more familiar and convenient. But because of watching mode and headers,grep
is not suitable.The idea is to add new regex filtering mode, leave current numeric/textual search as is. The reasons are:
procs
output is very similar to logs. I've come to this when I tried to watch for spawning and killing instances of two binaries while messing with processed like man or emacs which has same strings in command lines. A lot of--and
and--or
options plus adding spaces did the trick but it took some time. And here I thought "It would be nice to did the same with a simple regex"( S .*Rambox| D .*firefox)
. Currently I need to check my config forExact
orPartial
and think about--and
and--or
priorities.Desired implementation:
--text
(current search mode),--regex
(regex mode) and--smart
(regex autodetection by specific patterns, like | (…), * ? etc)[KEYWORD]…
, arguments there is a single ` argumentThe text was updated successfully, but these errors were encountered: