syncthing cli config devices XYZ-.. name set "FOO BAR" fails due to whitespace

Just a quickie:

I want to rename my device from default $HOST to something like “FOO BAR” via syncthing cli. A name with embedded whitespaces.

Whatever I try to escape the space: it fails. I permutated almost all possibilities and numbers of quotes, backslashes and even tried ’ ’ ( which worked … but wasn’t what I wanted :sunglasses:

It always fails with “expected 1 arugment, got 2” [1]

Is there any way to supply a spaced string to syncthing cli … set ?

System: Linux, bash, Syncthing 1.18.5

[1] : well, yeah, there’s a spelling error … not mine, so who cares :sunglasses:

Works as expected for me:

$ ./bin/syncthing cli --home ./config-testing config devices BXAEQNX-MC4GCEG-YQZGMDJ-4ME4SDW-TGHNYWO-UD2NWHL-XTJA3C4-NMC65QL name set "testing-t480-testing space"
$ ./bin/syncthing cli --home ./config-testing config devices BXAEQNX-MC4GCEG-YQZGMDJ-4ME4SDW-TGHNYWO-UD2NWHL-XTJA3C4-NMC65QL name get
testing-t480-testing space

ARGH…

Ok! Thanks for testing. I was using a badly written wrapper and had a ${@} vs "${@}" issue.

Sorry for wasting your time. We should reduce this post as "typo found in error message (arugment) " 8-)))

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.