Skip to content

[Bug report] Cannot programmatically delete abbreviations containing certain characters #118

@Chekote

Description

@Chekote

@olets's maintainer edit: this generalized into several bugs related. Summarizing here.

erase outputs a success message but doesn't actually delete if the abbreviation contains

  • a caret (^) (original report)
  • a hash symbol (#)
  • an exclamation point (!) *
  • double quotation marks (") *
  • single quotation marks (')

* Read #118 (comment) for workarounds.

Original report follows…


 
 
 
 

Is there an existing issue for this?

  • I have searched the existing issues

Update the issue title

  • I have updated the title

Expected Behavior

The abbreviation should be deleted.

Actual Behavior

zsh-abbr claims the abbreviation was deleted, but it is not.

Steps To Reproduce

  1. Add the abbreviation:
$ abbr a^='echo "Do something"'
Added the regular user abbreviation `a^`
  1. Run the abbreviation:
$ a^
  1. Notice the abbreviation runs as expected.
$ echo "Do something"
Do something
  1. Delete the abbreviation:
$ abbr e a^
Erased regular user abbreviation `a^`
  1. Try to run the abbreviation
$ a^
  1. Notice that it runs, even those zsh-abbr claimed it was erased.
$ echo "Do something"
Do something

Environment

zsh-abbr version 5.4.1
zsh 5.9 (x86_64-apple-darwin23.0)
OSTYPE darwin23.0

Installation method

Homebrew

Installation method details

Homebrew 4.3.0-20-g1f603d3

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions