From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2700 invoked by alias); 26 Jan 2016 13:52:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37792 Received: (qmail 12811 invoked from network); 26 Jan 2016 13:52:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.0 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Christian Neukirchen Subject: Re: Check if option given in short notation (e.g. -9) is set Date: Tue, 26 Jan 2016 14:51:46 +0100 Message-ID: <877fiw8n4d.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: host248-2.natpool.mwn.de In-Reply-To: (Sebastian Gniazdowski's message of "Tue, 26 Jan 2016 14:33:29 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Sebastian Gniazdowski writes: > Hello > [[ -o "-9" ]] doesn't work. Is there any way to check option given in > such format, besides holding an associative array that would assign > long name to each short name? Perhaps [[ $- = *9* ]] ? -- Christian Neukirchen http://chneukirchen.org