skywind3000 / z.lua

:zap: A new cd command that helps you navigate faster by learning your habits.
MIT License
3k stars 141 forks source link

z.lua is suddenly broken for me #101

Open NightMachinery opened 4 years ago

NightMachinery commented 4 years ago

I have been getting this error whenever I cd:

cd
/home/eva/.asdf/installs/lua/5.3.5/bin/lua: ...SH--SLASH-github.com-SLASH-skywind3000-SLASH-z.lua/z.lua:1054: att
empt to perform arithmetic on a nil value
stack traceback:
        ...SH--SLASH-github.com-SLASH-skywind3000-SLASH-z.lua/z.lua:1054: in function 'data_load'
        ...SH--SLASH-github.com-SLASH-skywind3000-SLASH-z.lua/z.lua:1325: in function 'z_add'
        ...SH--SLASH-github.com-SLASH-skywind3000-SLASH-z.lua/z.lua:1913: in function 'main'
        ...SH--SLASH-github.com-SLASH-skywind3000-SLASH-z.lua/z.lua:2697: in main chunk
        [C]: in ?

This started suddenly. Any ideas? I deleted z.lua and reinstalled it, to no avail.

skywind3000 commented 4 years ago

try to remove ~/.zlua data file

NightMachinery commented 4 years ago

@skywind3000 It worked. Thanks!

NightMachinery commented 4 years ago

@skywind3000 This issue popped again, and I just deleted this last line from .zlua and things got fixed: /home/eva/tmp-kindle/fic | Code Geass: The Prepared Rebellion V2 Chapter 49: Hierarchy of Black Knights, a code geass fanfic | FanFiction 6f03802c-2124-4994-bddb-5869811eddd1|1|1588260610 Perhaps the problem is with the pipe character? If so, consider switching to a more esoteric one, like https://stackoverflow.com/questions/8695118/whats-the-file-group-record-unit-separator-control-characters-and-its-usage .

NightMachinery commented 4 years ago

I still hope this can be fixed, but I have switched to zoxide now.