From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16655 invoked by alias); 23 Dec 2015 04:57:16 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21097 Received: (qmail 14383 invoked from network); 23 Dec 2015 04:57:14 -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.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=Od72YJ+ze2vL4mSy3T91q+tPZS5Cm8lsiF9J+dRcVvg=; b=L34QBrj/xKlXYFQo5+emsMhNFnOAYtn06DYdKNyo9uc+D7dxao80rkOPZvUZ9yhNpR 0aICNe2YhkLvzdPa4R3wvxanL38n/1E4yNfzBBdunsEbx7liW0jPtdiSJbJIGe5ZlJu7 uDn1OvFWstpUWRB4eG791Hxxfl1Vxzw+v2wokx9uGWEt4+gSNvRTCgXFr4NNHEsqYUC9 opdXUX+ilfw+mDBK+u6ibaaT4z/5uDU8h+ut3qxsjIRBRbZcaflqN25HAYjNc56ToBj+ tR4+u+LncemvKeS3fFYGEKie5vlWkfYWDCxjgP5EU+7qR6Q9SJZ7LtZtIC6NvVRNOGR/ GnNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=Od72YJ+ze2vL4mSy3T91q+tPZS5Cm8lsiF9J+dRcVvg=; b=LjfmS9tnBXFh51O3pJc1nygAL2E1YUBDp3m1bAtFONfbviTtNC8dTNKKedmZi9Mj4k 2aAIu17wo5imzYEe9cYTBgNCboDorDxMtk9HcJRwijJbnHt9YDf1r/nntL1g/P0lLRmA 4+pUVG8736+VINFpXfnG3f67WaSc6CkGxmvtTKSEjQvBYMXQTNCxh9RIC1IYnKjrJfhT LnQff1YjFpcpxzr6w7To3mJr5BFsfvtsCi8hngivbJMYsdMLRC1xQsA02yTIEbEhiTWd lU+cR4kSPIFZU8/B7j6NdG1hzGt8Pq7cTwJz/q1KNendgqCNCuvEuBoxkPrcjQcBdZxb OIeg== X-Gm-Message-State: ALoCoQnoaBxbHdRIQ6mJocT3R/hhod5EGDyPG00B4uLbT5tdsLb3wwo0GAXT+7KBo4g4DIpAg2S3dosl6xbrgtNELtVzEob2yQ== X-Received: by 10.98.9.2 with SMTP id e2mr39387064pfd.89.1450846630062; Tue, 22 Dec 2015 20:57:10 -0800 (PST) From: Bart Schaefer Message-Id: <151222205747.ZM29374@torch.brasslantern.com> Date: Tue, 22 Dec 2015 20:57:47 -0800 In-Reply-To: <20151222083043.GA6457@linux.vnet.ibm.com> Comments: In reply to Dominik Vogt "emulate zsh *except* pushd related options" (Dec 22, 9:30am) References: <20151222083043.GA6457@linux.vnet.ibm.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: emulate zsh *except* pushd related options MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 22, 9:30am, Dominik Vogt wrote: } } Is there a (safe!) way to say "emulate zsh but don't touch certain options"? The "emulate" command accepts the same "-o optionn_name" (or "+o") as shell startup, so you can do emulate -L zsh -o shwordsplit ... For your specific use case, the current state of the pushd and cd options can be enumerated this way: ${(Oa)${${(kv)options[(I)*pushd*|cd*|*cd]/off/+o}/on/-o}} That won't work in general because some options have "on" as a substring of the option name. So if your autoloaded function begins with: emulate -L zsh -o shwordsplit \ ${(Oa)${${(kv)options[(I)*pushd*|cd*|*cd]/off/+o}/on/-o}} you should get what you want.