From 82d487a0db225d35dd6bf4e0751508a9ab9bef9d Mon Sep 17 00:00:00 2001 From: root Date: Sat, 8 May 2010 02:19:15 +0200 Subject: Added builtin /unset --- noise | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'noise') diff --git a/noise b/noise index 9d4f815f..dcef9f9e 100755 --- a/noise +++ b/noise @@ -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 "Good bye!" exit -- cgit v1.2.3