Coder Social home page Coder Social logo

Color function maker about testssl.sh HOT 16 CLOSED

szepeviktor avatar szepeviktor commented on May 17, 2024
Color function maker

from testssl.sh.

Comments (16)

szepeviktor avatar szepeviktor commented on May 17, 2024

Maybe the b/w function variables shouldn't have a COLOR_ prefix.

from testssl.sh.

szepeviktor avatar szepeviktor commented on May 17, 2024

Please consider including it.

from testssl.sh.

drwetter avatar drwetter commented on May 17, 2024

I removed the stars also from my code (ugly) that needs to be removed as well.
Then could you give me an example how that function would be called? I am
not quite sure about it.

Am 11/17/2014 09:57 PM, schrieb Viktor Szépe:

Please consider including it.


Reply to this email directly or view it on GitHub #27 (comment).

from testssl.sh.

szepeviktor avatar szepeviktor commented on May 17, 2024

colorfuncmaker() generates functions like litegreen or green. So no modifications needed.
Look at the eval lines!

from testssl.sh.

drwetter avatar drwetter commented on May 17, 2024

@szepeviktor : Sorry for keeping this open for so long.

Would you mind doing a PR?

from testssl.sh.

szepeviktor avatar szepeviktor commented on May 17, 2024

I am sorry. I'd like to contribute only one function.
The one above generates all these function: https://github.com/drwetter/testssl.sh/blob/master/testssl.sh#L256-L348
So your code gets shorter.

from testssl.sh.

szepeviktor avatar szepeviktor commented on May 17, 2024

generates all these function

Should I explain what this means?

from testssl.sh.

drwetter avatar drwetter commented on May 17, 2024

Ok, no problem.

Like the idea though, so I reopened it for others to volunteer.

from testssl.sh.

szepeviktor avatar szepeviktor commented on May 17, 2024

The PR is easy. You just delete the literally defined functions (for example pr_liteblueln) and put this one in your code.

from testssl.sh.

szepeviktor avatar szepeviktor commented on May 17, 2024

You should also declare an array with all the colors.
declare -A COLORS=( [litegreen]='0\033[0;32m' [green]='2\033[0;32m' ) etc.

from testssl.sh.

szepeviktor avatar szepeviktor commented on May 17, 2024

removed the stars also from my code

So start should also be removed from this function.

from testssl.sh.

drwetter avatar drwetter commented on May 17, 2024

Am 07/23/2015 um 01:50 PM schrieb Viktor Szépe:

generates all these function

Should I explain what this means?

I got it, not sure whether the generated functions are kind of global then.
I assume they are, otherwise you wouldn't have suggested it.

from testssl.sh.

szepeviktor avatar szepeviktor commented on May 17, 2024

If they are not global, just make this function simply inline code.

from testssl.sh.

drwetter avatar drwetter commented on May 17, 2024

Thx!

from testssl.sh.

drwetter avatar drwetter commented on May 17, 2024

Needed to revert this.

Catch was the functions are being initiated at a fixed time instead of while calling.

Other solution needs to be found for this color_maker

from testssl.sh.

szepeviktor avatar szepeviktor commented on May 17, 2024

OK

from testssl.sh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.