Skip to content

Comment on PS1 generatorparent

Comments

I have this bit of magic in mine to map return codes to some semblance of a string version of them:

    LED=$(perl -le "\$!+=${LE};print \$!" 2>/dev/null || echo "unknown error")
It's not perfect but I haven't found a more reliable way to map exit status' to something like the right meaning.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.