psyinfra / onyo

text-based inventory system on top of git
ISC License
3 stars 5 forks source link

Provide hint on YAML for editors #644

Open bpoldrack opened 1 week ago

bpoldrack commented 1 week ago

Either a leading --- in asset files again (incl. temporary files) or a .yaml ending.

TobiasKadelka commented 1 week ago

If we decide to go only with .yaml, there is a need to modify onyo cat in parallel to show the --- for readability when multiple files are onyo cated at the same time.

TobiasKadelka commented 1 week ago

I continued to reflect on this, and tested this: I tried to manually add the --- with onyo edit, which is legal but of course does not work:

(onyo_new) tkadelka in ~/inventory on git:master
❱ onyo edit spaces/14.6y/3040/display_dell_u2722de.BZPK5P3         
Effective changes:
Accept changes? (y)es / continue (e)diting / (s)kip asset / (a)bort command[Default: yes]y
Save changes? No discards all changes. (y/n) [Default: yes]y

It is weird that manually editing does not work as expected by a user, and it destroys the round trip mode we want to have and discussed in #159 and #261.