Timeline for How can I un-export a variable, without losing its value?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 2, 2016 at 7:36 | comment | added | Gilles 'SO- stop being evil' | @muru If you're writing a bash script, you can use export -n or typeset +x indifferently. In ksh or zsh, there's only typeset +x. | |
| Jan 2, 2016 at 3:44 | comment | added | muru | Say, do you have any comments on typeset +x vs export -n for the shells that do support the former? Is export -n rarer, or does it not preserve some properties? | |
| Jan 2, 2016 at 0:32 | vote | accept | muru | ||
| Jan 2, 2016 at 0:31 | comment | added | muru | For those unfamiliar with ${var+foo}, it evaluates to foo if var is set, even if empty, and nothing otherwise. | |
| Jan 2, 2016 at 0:27 | history | edited | muru | CC BY-SA 3.0 | $2->$1: probably typo; syntax highlighting |
| Jan 2, 2016 at 0:16 | history | answered | Gilles 'SO- stop being evil' | CC BY-SA 3.0 |