diff options
author | root <root@shack.(none)> | 2010-05-08 02:19:15 +0200 |
---|---|---|
committer | root <root@shack.(none)> | 2010-05-08 02:19:15 +0200 |
commit | 82d487a0db225d35dd6bf4e0751508a9ab9bef9d (patch) | |
tree | c642a61be7cdc34a8a6e4eb546b7bd8b4fa1aada | |
parent | 9e24cf1941f87a294e5f9d212caac643ded27209 (diff) |
Added builtin /unset
-rwxr-xr-x | noise | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -39,6 +39,22 @@ noise_set() { # set a variable esac } +noise_unset() { # unset a variable + case "$1" in + (-q|--quiet) echo=: ; shift ;; + (*) echo=echo ;; + esac + case $# in + (1) ## + unset "noise_$1" + sed -ni "/^$1=/!p" $env + ;; + (*) + fail "broken commandline: $@" + ;; + esac +} + noise_quit() { # exit echo "[35mGood bye![m" exit |