exploitdb icon indicating copy to clipboard operation
exploitdb copied to clipboard

Please rework the --colour option

Open saladpanda opened this issue 4 years ago • 0 comments

I find the --colour option to be very confusing and mostly unnecessary.

Confusing because: specifying --colour actually disables colored output. This is extremely counterintuitive!

Additionally it is possible to detect whether the tools output goes to a terminal or to a pipe and therefore automatically decide whether or not to enable colored output. This is exactly what grep and other gnu-tools are doing with the default --color=auto.

It would be nice if you could either remove the --colour option completely and replace it by auto-detection or reimplement it in a similar fashion as the gnu tools.

For the time being I wrote myself a wrapper-script that does the detection for me and put it into ~/bin/searchsploit:

#!/bin/bash

if [ -t 1 ]
then
    # output to terminal - enable colors
    /usr/bin/searchsploit "$@"
else
    # output to pipe - disable colors
    /usr/bin/searchsploit --colour "$@"
fi

saladpanda avatar Jul 09 '21 11:07 saladpanda