Skip to content

_zsh_autosuggest_highlight_apply throws bad math expression error when POSIX_IDENTIFIERS is set #838

@posixbaby

Description

@posixbaby

Describe the bug

When you set POSIX_IDENTIFIERS, _zsh_autosuggest_highlight_apply throws an error:

_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'

To Reproduce

Steps to reproduce the behavior:

% setopt POSIX_IDENTIFIERS
% # type literally anything and errors will occur
% unsetopt POSIX_IDENTIFIERS
% # errors stop

Expected behavior

No error or fail gracefully. If the function cannot run with POSIX_IDENTIFIERS set, it should inform the user.

Screenshots

user@host:~/ > setopt posix_identifiers 
user@host:~/ > h
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ > hi
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ > h                      
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ >                        
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ > 
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ > setopt posix_identifiers
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ > setopt posix_identifiers
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ > unsetopt posixidentifiers
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ > unsetopt posixidentifiers
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ > unsetopt posixidentifiers
_zsh_autosuggest_highlight_apply:3: bad math expression: operator expected at `POSTDISPLA...'
user@host:~/ > unsetopt posixidentifiers
user@host:~/ > hi

Desktop

  • OS + distribution: macOS 15.7 (24G222)
  • Zsh version: 5.9
  • Plugin version: 0.7.1

Additional context

Zsh configured/managed via nix-darwin and home-manager.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions