olets / zsh-abbr

The zsh manager for auto-expanding abbreviations, inspired by fish. ~13,000 unique cloners as of May '24, 580+ Homebrew installs 6/23-6/24
https://zsh-abbr.olets.dev
Other
511 stars 18 forks source link

[Bug report] bad math expression: operator expected at `Jan 1 03:...' #106

Closed Orest58008 closed 6 months ago

Orest58008 commented 6 months ago

Is there an existing issue for this?

Update the issue title

Expected Behavior

abbr working

Actual Behavior

~
><> abbr a=b
_abbr_job_push:wait_turn:3: bad math expression: operator expected at `Jan  1 03:...'

Steps To Reproduce

No response

Environment

`abbr profile` also results in _abbr_job_push:wait_turn:3: bad math expression: operator expected at `Jan  1 03:...'

Installation method

Plugin manager

Installation method details

zcomet(last update as of 2023-12-31)

Anything else?

zsh 5.9 (x86_64-pc-linux-gnu)

olets commented 6 months ago

Hi @Orest58008, thanks for reporting!

What output do you get for

date +%s

and what OS are you using?

olets commented 6 months ago

@Orest58008 I think I have the fix for this. Can you try it out? You'll need to switch zsh-abbr to the branch

106-date-format

One way to do that for zcomet is

  1. Delete the plugin directory
    rm -rf ${ZCOMET[REPOS_DIR]}/olets/zsh-abbr
  2. In .zshrc change zcomet load olets/zsh-abbr to zcomet load olets/zsh-abbr@106-date-format
Orest58008 commented 6 months ago

I believe this was a problem with my .zshrc in which I set path as (/opt/plan9/bin ... $path), and couldn't unset it even after correctly setting /opt/plan9/bin after $path. Sorry to bother you if I did

olets commented 6 months ago

Sorry to bother you if I did

You didn't, and in looking into it I learned something new 👍