zsh-workers
 help / color / mirror / code / Atom feed
From: Experts Ravioli <experts.ravioli@gmail.com>
To: zsh-workers@zsh.org
Subject: Setting cdablevars adds 10-15s to run time for non existing command
Date: Thu, 18 Mar 2021 23:42:30 +0000	[thread overview]
Message-ID: <CAMoJa6=uehHiLJfzbrLiJ9hn4GgS9R8sMgsC3_CJnx8Mz5BROA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1854 bytes --]

Hey everyone.

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.
This happens with Alacritty, Gnome Terminal and Tilix. Does not happen if I
switch to bash. Does not happen if I comment out `cdablevars`.

When I say run time, I mean actual time on the clock. If I run the command
through `time insert_random_command_name_here` it takes the same amount,
but the output is:

```
% time insert_random_command_name_here
zsh: command not found: insert_random_command_name_here
insert_random_command_name_here  0,00s user 0,00s system 79% cpu 0,002 total
```

Here some more info:


```
% uname -a
Linux ### 5.10.24-051024-generic #202103171801 SMP Wed Mar 17 18:42:04 UTC
2021 x86_64 x86_64 x86_64 GNU/Linux

% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal

% alacritty --version
alacritty 0.7.2

% zsh --version
zsh 5.8 (x86_64-ubuntu-linux-gnu)
```

```
% cat .zshrc
#!/usr/bin/zsh
#disable ctrl-s ctrl-q
stty -ixon

# color
autoload -U colors
colors

# history
setopt hist_ignore_all_dups inc_append_history extended_history
HISTFILE="$ZDOTDIR/history"
HISTSIZE=8192
SAVEHIST=16384

# keybindings
bindkey -v
bindkey "^B" beginning-of-line
bindkey "^R" history-incremental-search-backward

# remap Insert to Print Screen
xmodmap -e "keycode 118 = Print"

# options
# awesome cd movements from zshkit
setopt autocd autopushd pushdminus pushdsilent pushdtohome *cdablevars*
DIRSTACKSIZE=5
```

```
% cat .zshenv
#!/usr/bin/zsh

# XDG

export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$XDG_CONFIG_HOME/local/share"
export XDG_CACHE_HOME="$XDG_CONFIG_HOME/cache"

# zsh

export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
```

Does anyone have any idea?

Thanks a bunch!

[-- Attachment #2: Type: text/html, Size: 2601 bytes --]

             reply	other threads:[~2021-03-18 23:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 23:42 Experts Ravioli [this message]
2021-03-23  2:55 ` Bart Schaefer
2021-03-23 12:40 ` Stephane Chazelas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMoJa6=uehHiLJfzbrLiJ9hn4GgS9R8sMgsC3_CJnx8Mz5BROA@mail.gmail.com' \
    --to=experts.ravioli@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).