Richard Schneeman on Nostr: I have an elaborate terminal prompt with info that's not always relevant to reporting ...
I have an elaborate terminal prompt with info that's not always relevant to reporting a bug or sharing a series of terminal commands. To that end, I made a `demo` command that toggles my prompt on and off to make for easier copy/pasting. I like it so far:
$ which demo
demo () {
if [ -z "$OLDPROMPT" ]
then
export OLDPROMPT="$PROMPT"
export PROMPT="\$ "
else
export PROMPT="$OLDPROMPT"
unset OLDPROMPT
fi
}
Published at
2025-01-13 21:36:43Event JSON
{
"id": "9ced1331595bfe12cd17e35531d405466c0fa3133e825682168b2fbfad3f2bb5",
"pubkey": "5c931aab4bd50aef18e4fd6a257cb53bb70fee015066bea9102ac27a8e230f5c",
"created_at": 1736804203,
"kind": 1,
"tags": [
[
"proxy",
"https://ruby.social/users/Schneems/statuses/113823200259498145",
"activitypub"
]
],
"content": "I have an elaborate terminal prompt with info that's not always relevant to reporting a bug or sharing a series of terminal commands. To that end, I made a `demo` command that toggles my prompt on and off to make for easier copy/pasting. I like it so far:\n\n$ which demo\ndemo () {\n\tif [ -z \"$OLDPROMPT\" ]\n\tthen\n\t\texport OLDPROMPT=\"$PROMPT\"\n\t\texport PROMPT=\"\\$ \"\n\telse\n\t\texport PROMPT=\"$OLDPROMPT\"\n\t\tunset OLDPROMPT\n\tfi\n}",
"sig": "6cac3e0f8e84aeae174367fb525e000f6d15e9bb2a81cd5db69faac27af02d05805953c144d3ddaed982be7c72dc44b373a992348dafce757aaa13ee3b646e94"
}