Skip to content

common-aliases plugin causes infinite loop if EDITOR is not set #9212

Closed
@nayaverdier

Description

Describe the bug
If $EDITOR is not set when common-aliases is initialized, it will result in empty suffix aliases that send zsh into an infinite loop and the process needs to be killed:

$ alias -s
c=''
cc=''
txt=''
...

To Reproduce
Steps to reproduce the behavior, for example:

  1. Enable the common-aliases plugin, and do not set $EDITOR before loading ohmyzsh.
  2. Run command touch foo.txt; foo.txt (NOTE: you will have to find the PID to kill this process)
  3. This will send zsh into an infinite loop using lots of CPU resources, and which persists even after the terminal is killed.

Expected behavior
If $EDITOR (or other similar variables) are not set/empty, common-aliases should not set the related aliases.

Desktop (please complete the following information):

  • OS / Distro: [e.g. Ubuntu]
  • Latest ohmyzsh update?: Yes
  • ZSH Version: 5.1.1
  • Terminal emulator: [e.g. gnome-terminal]

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions