GithubHelp home page GithubHelp logo

Comments (14)

olets avatar olets commented on July 29, 2024

Thanks for the report!

Please open a separate ticket for the prezto question

Ubuntu + zsh 5.4.2 should be okay — my testing includes Ubuntu 18.04 + zsh 5.4.2. I've confirmed that sourceing zsh-abbr.zsh works for me. But for the record what version of Ubuntu are you on?

I haven't tested on WSL2. I'm guessing the problem is Windows-specific file paths.

I don't have a Windows test machine. If you're able to help with the investigation that'd be great

  • What do you get when you run echo $ABBR_USER_ABBREVIATIONS_FILE?
  • What do you get when you run echo $ABBR_TMPDIR?
  • What do you get when you run echo $OSTYPE?
  • What do you get when you run uname?
  • What do you get when you run echo $XDG_CONFIG_HOME?
  • Does ls ~/AppData/Local have a bunch of configuration files? (Not sure what will be there, could paste here if it isn't sensitive)
  • In your zshrc, add ABBR_DEBUG=1 on a line above where you sourced zsh-abbr. Open a new terminal. Paste any abbr-related logs here. (You can then remove ABBR_DEBUG=1 from your zshrc)

The debug logs aren't super fine-grained, but that will help narrow the problem down.

from zsh-abbr.

Herjar avatar Herjar commented on July 29, 2024

Thanks for a quick reply.

Ubuntu version: 18.04.1

echo $OSTYPE: linux-gnu
uname: Linux
echo $XDG_CONFIG_HOME: unset. I tried setting it to $HOME/.config, but it did not change anything.
ls ~/AppData/Local: cannot access '/home/herjar/AppData/Local': No such file or directory.

export ABBR_DEBUG=1 && source ~/.zsh/plugins/zsh-abbr/zsh-abbr.zsh:
_abbr_job_push
_abbr_job_push:add_job
_abbr_init
_abbr_load_user_abbreviations
_abbr_load_user_abbreviations:setup
_abbr_load_user_abbreviations:load
_abbr_job_pop

Then it hangs forever it seems. I ctrl+C and it prints
_abbr_bind_widgets

Then it exits. Next time I try to source I get the original error message.
_abbr_job_push
_abbr_job_push:add_job
_abbr_job_push:handle_timeout
abbr: A job added at 11:48:59 Sep 13 2020 has timed out.
The job was related to initialization.
This could be the result of manually terminating an abbr activity, for example during session startup.
If you believe it reflects a abbr bug, please report it at https://github.com/olets/zsh-abbr/issues/new

echo $ABBR_USER_ABBREVIATIONS_FILE: /home/herjar/.config/zsh/abbreviations
echo $ABBR_TMPDIR: /tmp/zsh-abbr/

from zsh-abbr.

olets avatar olets commented on July 29, 2024

Appreciate your helping test!

Looks like WSL was a red herring. Let's try this:

  1. run rm -rf ${ABBR_TMPDIR}jobs to get a clean zsh-abbr jobs slate
  2. run exec zsh or open a new terminal. assuming it hangs, ctrl-c
  3. run ls ${ABBR_TMPDIR}jobs and paste the output here
  4. if 👆 has one result which looks like XXXXXXXXXX.XXXXX, run _abbr_job_pop $(ls ${ABBR_TMPDIR}jobs). Paste any errors here.
  5. run (( ABBR_DEFAULT_BINDINGS )) && echo done and see if it hangs
  6. run emulate and paste output here

from zsh-abbr.

olets avatar olets commented on July 29, 2024

That's an aspirational commit message. It'll likely be a few days before I'm free to work on this again, so figured I'd try a fix. Still interested in what you get for the second round of experiments (prev comment) but you could also try checking out the branch 22-init-hangs and opening a new terminal.

from zsh-abbr.

Herjar avatar Herjar commented on July 29, 2024

The 22-init-hangs branch fixes the problem 🎉

Output as requested:

  • ls ${ABBR_TMPDIR}jobs:
    1600067698.16636
  • _abbr_job_pop $(ls ${ABBR_TMPDIR}jobs):
    No error, it just prints _abbr_job_pop and hangs. I have to ctrl+c to exit.
  • (( ABBR_DEFAULT_BINDINGS )) && echo done:
    Does not hang. Prints done immediately.
  • emulate:
    Just prints zsh.

from zsh-abbr.

olets avatar olets commented on July 29, 2024

🎉

A little surprised that that fixed it, given that output. But if it works it works! Merged into main and released it in v4.0.2. Let me know if that gives you trouble

The prezto question is one I've been interested in. So if you're down to keep testing things don't hesitate to open another ticket!

from zsh-abbr.

Herjar avatar Herjar commented on July 29, 2024

v4.0.2 works! Thank you.

Adding to prezto also works now. Clone this repo to $HOME/.zprezto/modules/zsh-abbr, or clone it outside prezto folder somewhere and add the external folder in .zpreztorc, e.g. zstyle ':prezto:load' pmodule-dirs $HOME/.zsh/plugins

Then load it in .zpreztorc by adding to zstyle ':prezto:load' pmodule, e.g.:

zstyle ':prezto:load' pmodule \
  'environment' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'fasd' \
  'zsh-abbr' \
  'screen' \
  'tmux' \
  'node' \
  'git' \
  'archive' \
  'syntax-highlighting' \
  'history-substring-search' \
  'autosuggestions' \
  'prompt' \

from zsh-abbr.

Herjar avatar Herjar commented on July 29, 2024

I am not sure why, but this issue has started happening again. It still hangs at _abbr_job_pop, but I get more output before it hangs:

export ABBR_DEBUG=1 && source ~/.zsh/plugins/zsh-abbr/zsh-abbr.zsh

_abbr_job_push
_abbr_job_push:add_job
_abbr_init
_abbr_load_user_abbreviations
_abbr_load_user_abbreviations:setup
_abbr_load_user_abbreviations:load
abbr
_abbr:util_set_once
_abbr:add
_abbr:util_add
_abbr:util_check_command
_abbr:util_sync_user
_abbr:util_log
abbr
_abbr:add
_abbr:util_add
_abbr:util_check_command
_abbr:util_sync_user
_abbr:util_log
abbr
_abbr:add
_abbr:util_add
_abbr:util_check_command
_abbr:util_sync_user
_abbr:util_log
_abbr_job_pop

Then it hangs there. It I ctrl+c and try to load again I get the same previous job timed out error.

from zsh-abbr.

olets avatar olets commented on July 29, 2024

Thanks for the update. Looks like you've added a few abbreviations, is that right? If so mind sharing them in case there's some bug in how they're parsing?

What's the output of setopt? What's the output of unsetopt?

from zsh-abbr.

Herjar avatar Herjar commented on July 29, 2024

Sorry for the late reply, I missed this notification.

> cat global-user-abbreviations
typeset -g -A ABBR_GLOBAL_USER_ABBREVIATIONS=( y '"test"' )

> cat regular-user-abbreviations
typeset -g -A ABBR_REGULAR_USER_ABBREVIATIONS=( \'\' '""' gst '"git status"' )

Not sure how I ended up with that empty string in there.

Deleting everything in /tmp/zsh-abbr/ and deleting everything in ~/.config/zsh/abbreviations it still hangs for me:

export ABBR_DEBUG=1 && source ~/.zsh/plugins/zsh-abbr/zsh-abbr.zsh
_abbr_job_push
_abbr_job_push:add_job
_abbr_init
_abbr_load_user_abbreviations
_abbr_load_user_abbreviations:setup
_abbr_load_user_abbreviations:load
_abbr_job_pop
^C
_abbr_bind_widgets

Not sure what happened as it worked ok for a while.

setopt:

alwaystoend
autocd
noautoremoveslash
nobeep
nocaseglob
completeinword
extendedglob
histfindnodups
histignorealldups
histignoredups
histignorespace
histreduceblanks
histsavenodups
interactive
nolistbeep
localoptions
localtraps
login
longlistjobs
monitor
nonomatch
numericglobsort
promptsubst
shinstdin
zle

unsetopt:

noaliases
aliasfuncdef
allexport
noalwayslastprompt
appendcreate
noappendhistory
autocontinue
noautolist
noautomenu
autonamedirs
noautoparamkeys
noautoparamslash
autopushd
autoresume
nobadpattern
nobanghist
nobareglobqual
bashautolist
bashrematch
nobgnice
braceccl
bsdecho
nocasematch
cbases
cdablevars
chasedots
chaselinks
nocheckjobs
noclobber
combiningchars
completealiases
continueonerror
correct
correctall
cprecedences
cshjunkiehistory
cshjunkieloops
cshjunkiequotes
cshnullcmd
cshnullglob
nodebugbeforecmd
dvorak
emacs
noequals
errexit
errreturn
noevallineno
noexec
extendedhistory
noflowcontrol
forcefloat
nofunctionargzero
noglob
noglobalexport
noglobalrcs
globassign
globcomplete
globdots
globstarshort
globsubst
nohashcmds
nohashdirs
hashexecutablesonly
nohashlistall
histallowclobber
nohistbeep
histexpiredupsfirst
histfcntllock
histlexwords
histnofunctions
histnostore
nohistsavebycopy
histsubstpattern
histverify
nohup
ignorebraces
ignoreclosebraces
ignoreeof
incappendhistory
incappendhistorytime
interactivecomments
ksharrays
kshautoload
kshglob
kshoptionprint
kshtypeset
kshzerosubscript
nolistambiguous
listpacked
listrowsfirst
nolisttypes
localloops
localpatterns
magicequalsubst
mailwarning
markdirs
menucomplete
nomultibyte
nomultifuncdef
nomultios
nonotify
nullglob
octalzeroes
overstrike
pathdirs
pathscript
pipefail
posixaliases
posixargzero
posixbuiltins
posixcd
posixidentifiers
posixjobs
posixstrings
posixtraps
printeightbit
printexitvalue
privileged
promptbang
nopromptcr
nopromptpercent
nopromptsp
pushdignoredups
pushdminus
pushdsilent
pushdtohome
rcexpandparam
rcquotes
norcs
recexact
rematchpcre
restricted
rmstarsilent
rmstarwait
sharehistory
shfileexpansion
shglob
shnullcmd
shoptionletters
noshortloops
shwordsplit
singlecommand
singlelinezle
sourcetrace
sunkeyboardhack
transientrprompt
trapsasync
typesetsilent
nounset
verbose
vi
warncreateglobal
warnnestedvar
xtrace

from zsh-abbr.

olets avatar olets commented on July 29, 2024

Thanks! And one last question for now: can you confirm abbr -v is 4.0.2? 😃

from zsh-abbr.

Herjar avatar Herjar commented on July 29, 2024

🤦‍♂️ I checked out master branch after testing the fix branch, and master is 4.0.0. I changed to main branch and it works again. Thanks for your patience.

from zsh-abbr.

olets avatar olets commented on July 29, 2024

Oh that is confusing. I'll work on a good way to officially retire master. Glad to have my attention called to that!

from zsh-abbr.

olets avatar olets commented on July 29, 2024

Belatedly recognizing bug reporters in https://github.com/olets/zsh-abbr#community and https://zsh-abbr.olets.dev/community/. would you like to be added @Herjar?

from zsh-abbr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.