crudini icon indicating copy to clipboard operation
crudini copied to clipboard

add support for ssh config files (~/.ssh/config)

Open ssbarnea opened this issue 7 years ago • 1 comments

It would be really nice if crudini would be able to configure ssh config files too.

If anyone is aware about another tool that can do this please post a message. Using sed is not really the best (and safe) way to do it.

ssbarnea avatar Dec 06 '16 11:12 ssbarnea

This is a good idea as the formats are close. In general it would be good to support filters to adjust to/from ini format, so you could crudini --filter=ssh to support this format for example.

Something like this processing would work internally, to ini format: sed 's/^Host \(.*\)/[\1]/; s/^ *//; s/ / = /' and from ini format: sed '/^\[/,$ {s/^\[\(.*\)\]/Host \1/;t;s/^/ /}'

pixelb avatar Dec 07 '16 13:12 pixelb