Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ssbarnea opened this issue Dec 6, 2016 · 1 comment
Open

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

ssbarnea opened this issue Dec 6, 2016 · 1 comment

Comments

@ssbarnea
Copy link

ssbarnea commented Dec 6, 2016

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.

@pixelb
Copy link
Owner

pixelb commented Dec 7, 2016

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/^/ /}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants