Remix.run Logo
zamadatix 5 hours ago

Never thought I'd see hackers saying INI format looked ugly of all things. It's basic, sure, but that's a good thing for something meant to be easily editable by hand from any editor. Otherwise, it's just key value pairs in named sections, how ugly can it be about that?

5 hours ago | parent | next [-]
[deleted]
jjgreen 5 hours ago | parent | prev | next [-]

key-value pairs where the = cannot be surrounded by spaces, so I have to write

  [Service]
  Type=oneshot
  WorkingDirectory={{ home }}/current/
  Environment=RAILS_ENV=production
  ExecStart=/bin/sh -lc "bin/db-backup --verbose"
which fills me with sadness
voxic11 4 hours ago | parent | next [-]

Whitespace immediately before or after the equals sign is completely ignored by the parser. Its the standard INI format.

yjftsjthsd-h 5 hours ago | parent | prev [-]

What? You absolutely can have spaces; most of mine look more like

  [Service]
  Type             = oneshot
  WorkingDirectory = %h/current/
  Environment      = RAILS_ENV=production
  ExecStart        = /bin/sh -lc "bin/db-backup --verbose"
jjgreen 4 hours ago | parent [-]

Friend, you have changed my life

bblb 14 minutes ago | parent | next [-]

My epiphany a month ago was that I can use

   Environment = MULTIPLE=environment VARIABLES="in single line"
weavie 3 hours ago | parent | prev [-]

Is this one of those cases where at one point you had an error in the file and you figured it was down to spaces? You fixed that issue, it still didn't work but from that point you never thought to question the assumption.

I find myself doing this sort of thing all the time..

jjgreen an hour ago | parent | next [-]

Somewhere in my head I had that spaces caused a syntax error, and the UI for systemd is not obvious when you first start using it ... so if it's working then leave well alone. I'll be making all of my .service files (not so many) human-readable in the near future!

troyvit 3 hours ago | parent | prev [-]

That was (cough still is) ddclient for me.

ramon156 4 hours ago | parent | prev [-]

TOML would look a lot more quiet, but I'm not sure if TOML would be a good fit

kevinmgranger 4 hours ago | parent [-]

unit files barely have any nesting, so the INI-like format is already 90% of the way towards TOML, no?