You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I was trying to sync cheatsheets between devices, so I put my conf.yml to my dotfiles. Suddenly, I realized that I still have to sync the community's cheatsheets manually(clone it) because the config only describes cheatsheets' locations.
Describe the solution you'd like
Add source field to each cheatpath like below, then we may have the ability to init/update cheatsheets, then users don't need to clone the repo manually.
This gives cheat the ability to describe cheatsheet's source, cheat may be able to manage cheatsheets without this helper scripts
- name: community
path: ~/cheatsheets/community
source: https://github.com/cheat/cheatsheets.git # <-- add this
tags: [ community ]
readonly: true
Describe alternatives you've considered
Still needs to add a field to config to describe cheatsheet's source but let this helper scripts to manage cheatsheets.
I think this alternative have the minimum changes and more flexible.
cheat: load/edit/save cheatsheets
cheat helper scripts: init/update cheatsheets
init() {
readarray d < <(yq -c '.cheatpaths[]' ~/.cheat.yml) # here's a hard code for cheat's config, I think we need an command option to show what exactly the cheat is using. Just like nginx -t
for c in "${d[@]}";
do
name="$(echo ${c} | yq -r '.name')"
path="$(echo ${c} | yq -r '.path')"
src="$( echo ${c} | yq -r '.source')"
echo "Init $name"
[ ! -d "$path" ] && git clone $src $path || :
done
echo "Finished init"
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I was trying to sync cheatsheets between devices, so I put my
conf.yml
to mydotfiles
. Suddenly, I realized that I still have to sync the community's cheatsheets manually(clone it) because the config only describes cheatsheets' locations.Describe the solution you'd like
Add
source
field to each cheatpath like below, then we may have the ability to init/update cheatsheets, then users don't need to clone the repo manually.This gives
cheat
the ability to describe cheatsheet's source,cheat
may be able to manage cheatsheets without this helper scriptsDescribe alternatives you've considered
Still needs to add a field to config to describe cheatsheet's source but let this helper scripts to manage cheatsheets.
I think this alternative have the minimum changes and more flexible.
load/edit/save cheatsheets
init/update cheatsheets
The text was updated successfully, but these errors were encountered: