Closed jfmercer closed 10 months ago
Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)
@denisidoro (ping)
Workaround until an application native solution comes along:
f_navi_install_repo() {
local url="$1"
local name="$2"
local cheatpath="$(navi info cheats-path)"
local dir="$cheatpath/$name"
git -C "$dir" pull || git clone "$url" "$dir"
}
#navi repo add denisidoro/navi-tldr-pages
f_navi_install_repo "https://github.com/denisidoro/navi-tldr-pages" "denisidoro__navi-tldr-pages"
then navi
will display the cheats :-)
Yeah, the workaround is so simple that I'd rather not implement it as a feature in navi itself. I'll close this ticket as the workaround is good enough.
@denisidoro
It is so simple, I wonder why it was not bake in navi ;-)
navi already acts as a "cheatsheet" repo manager.
The workaround relies on:
Would you consider documenting the workaround as (a) official procedure OR (b) bake the functionality in navi itself ?
I guess Navi could skip the call to fzf in this case and optimistically assume the value which makes the most sense in this case.
I can't give an ETA for implementing it, though.
If someone submits a PR for it, I can review it and ensure it's going to be live in the next release.
How do I do a non-interactive install of my cheatsheets? When I run
yes | navi repo add denisidoro/cheats
, I still get the interactive prompt. I have not succeeded in write anexpect
to automate this.Any ideas? I'm happy to contribute to
navi
's documentation if there is a solution.Thanks.