SidOfc / cani

A TUI wrapper around caniuse data using FZF and curses

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error if a shell resource file does not exists

kascote opened this issue · comments

when read the shell resource files there is no check it the file exists.
In may case I don't use zsh and the program break at the first try

https://github.com/SidOfc/cani/blob/master/lib/cani/completions.rb#L103

btw: I think is not ok to change the user resources files without ask first. I think the best to document it on the read.me or put it under a flag

Hi and thank you for posting your issues, you make a valid point that there should be an existence check and indeed, a flag should be added to control whether or not to auto-modify shell files. It would allow a user to choose to do so or handle it manually in their preferred style and shell setup.

This behavior is actually documented in the configuration section but if this section is unclear to you feel free to share what could potentially be improved :)

Thanks again and looking into it!

Existence checks and an option to permanently disable the automatic updating of config files have been added and a new version has been released, check the docs for more information and let me know if you experience any further issues.

Cheers ✌️