From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9043 invoked from network); 23 Mar 2021 12:40:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Mar 2021 12:40:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1616503255; b=aMIZWeBGj2SX7dXcBLx5c5mTaa9Z0M8VxB9VLLuRBVFlP6jl5ebefEDAycqkigXfBEsUe78SMn fxWmnZwC39NZbVjlCa71Ys/CQ8S+Kwv7dKm97mgrSlVqrkLHL+il5aEcfpAaPJkHKjXON2BBiS av7zuBfwe3rgRMY1Mp+D8LfCWmw5xKKW57RQ1C1+We+MOyEw6aJxd1++Etjny/83F1zuQVyrkg AODTK0vukPeEmq84+rdUwUNo6xBABAwLVRVsrWAkFFH/qHfOrs4AkwTq9rQman6L35rDOBK0O0 EtH4VTp0Jz66HpY5z32KK6CljEm2goK81FHr2V2TdlHdvQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay11.mail.gandi.net) smtp.remote-ip=217.70.178.231; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1616503255; bh=B1bjG+9Z+soBJtNUOlm18knR8b726+VWf5Cei+T4rhE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=jC4v4vhCJbW8KsjAPCEbtyuhO0BWo2vMpfoQI7uk0l2V95dBGbJjGp08PLHcTKzdcAGpsljrln FXsA2iKz0oy8GnugfFibOderOW+PxdQxoYFaY4dI/c8ILF3CJ97bbOrp1up8/Zju4ghUqygAJo 4EIT+CKn8b2HnCZaQvza/LvGHF9tacuY2D2PSPxwnIRJYCGxyhOLUFBAz4RZyoABhCSQD32c6l wAVJEc2G+TJSNaLTPvoGxJVv7O1rHFOngM4+By9sHD7eiEY3tZgrpbibRypQt4YK7P6qIbZAPj RHjG1vgtQMdE9pWfj924Yp7gm+vmtTOhycE7QimUeqWvsQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=6XbXGxW22MsE8MZlTiVRXpVL6+lV/q6EKUZG2D5AEqU=; b=RDNpNKNWQAIbdmy9g8DqHUE9yB UHtjte9pla0jJ3wCOGY3tRfQmSsCcTBcFT6onKOl/cda9KA2f4T0T1u9s8Zs8a1sIoyMKcy3YNBha NJvUw+e29QsnmtnY616x/UTkY0wy5AtBitPekdGyV0EDEcxJOzNZcqdwpqaCSRuYEbnS+cAYWL/SC 0cm89U9SLJe6152nb283kY03krF51dW6D+qBm20+K+XQYZnK+/mAyz9RzXpiHbXu9RDBepwARE/Rz cr55hqNnjCV3Fk9258/7hNxiXMMrcR2we5FsPemsREuW2sCCjeEaF/4KAGd1c23s/m3EnxYz+KerP +a+WLPog==; Received: from authenticated user by zero.zsh.org with local id 1lOgL5-0004Z2-SN; Tue, 23 Mar 2021 12:40:51 +0000 Authentication-Results: zsh.org; iprev=pass (relay11.mail.gandi.net) smtp.remote-ip=217.70.178.231; dmarc=none header.from=chazelas.org; arc=none Received: from relay11.mail.gandi.net ([217.70.178.231]:55133) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1lOgKq-0004Pp-Gj; Tue, 23 Mar 2021 12:40:38 +0000 Received: from chazelas.org (0547c5a9.skybroadband.com [5.71.197.169]) (Authenticated sender: stephane@chazelas.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 96489100006; Tue, 23 Mar 2021 12:40:34 +0000 (UTC) Date: Tue, 23 Mar 2021 12:40:33 +0000 From: Stephane Chazelas To: Experts Ravioli Cc: zsh-workers@zsh.org Subject: Re: Setting cdablevars adds 10-15s to run time for non existing command Message-ID: <20210323124033.g3p6d2ztsikhslzb@chazelas.org> Mail-Followup-To: Experts Ravioli , zsh-workers@zsh.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Seq: 48229 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: 2021-03-18 23:42:30 +0000, Experts Ravioli: [...] > If I use `setopt cdablevars` in my .zshrc and then I try to run a > `insert_random_command_name_here` (which does not exist) the prompt returns > after 10-15s. [...] See also: https://unix.stackexchange.com/questions/606118/zsh-slow-doing-eval-with-path There, I did say (among other things I invite you to read): } I would personally stay clear of that cdablevars option as it's } bound to give you bad surprises one day or another. Without it, } you can always do cd ~user or cd ~var, and I find it much better } to request it explicitly when you do want to cd into something } other than the directory given as argument. } } That cdablevars was already in the very first version of zsh } from 1990, inspired by tcsh that does that by default. It } predates the expansion of ~var. cdablevars should be considered } as a historical artefact IMO. -- Stephane