Search code examples
zshoh-my-zsh

How to disable "..." expansion in zsh


I recently switched from Bash to zsh and I realise I now have troubles using bazel tool: in lots of cases I run commands in the current directory invoking bazel run ... or bazel query ....

Unfortunately, those three dots are expanded to ../.. which doesn't make any sense for me:

$ echo ...
../..

I found I can quote those dots and do bazel run '...', but I wonder is there a way to disable this expansion completely - I never use this three-dots-short-cut.


Solution

  • The ... alias is defined by Oh-My-Zsh, a third-party collection of configuration files for zsh.

    We can unalias the command by adding the following:

    unalias \...
    

    inside the ~/.zshrc file, this needs to be done after the line that sources the om-my-zsh.sh script