Parser: switch true/false to yes/no

This commit is contained in:
Akemi Izuko 2024-07-17 21:57:55 -06:00
parent a6b3732cd3
commit 2f1959a28b
Signed by: akemi
GPG key ID: 8DE0764E1809E9FC
5 changed files with 13 additions and 13 deletions

View file

@ -132,7 +132,7 @@ Will generate:
```sshconfig ```sshconfig
Host ohaton: Host ohaton:
ForwardX11 false ForwardX11 no
Hostname ohaton.cs.ualberta.ca Hostname ohaton.cs.ualberta.ca
IdentitiesOnly yes IdentitiesOnly yes
IdentityFile ~/.ssh/id_ed25519 IdentityFile ~/.ssh/id_ed25519
@ -140,7 +140,7 @@ Host ohaton:
User emiliko User emiliko
Host coronation: Host coronation:
ForwardX11 false ForwardX11 no
Hostname coronation.cs.ualberta.ca Hostname coronation.cs.ualberta.ca
IdentitiesOnly yes IdentitiesOnly yes
IdentityFile ~/.ssh/id_ed25519 IdentityFile ~/.ssh/id_ed25519

View file

@ -132,7 +132,7 @@ def to_ssh_config_string(parse):
for key, values in keys.items(): for key, values in keys.items():
for value in values: for value in values:
if isinstance(value, bool): if isinstance(value, bool):
lines.append(f"\t{key} {'true' if value else 'false'}") lines.append(f"\t{key} {'yes' if value else 'no'}")
else: else:
lines.append(f"\t{key} {value}") lines.append(f"\t{key} {value}")

View file

@ -1,15 +1,15 @@
Host ohaton Host ohaton
ForwardX11 false ForwardX11 no
Hostname ohaton.cs.ualberta.ca Hostname ohaton.cs.ualberta.ca
IdentitiesOnly true IdentitiesOnly yes
IdentityFile ~/.ssh/id_ed25519 IdentityFile ~/.ssh/id_ed25519
Port 22 Port 22
User emiliko User emiliko
Host coronation Host coronation
ForwardX11 false ForwardX11 no
Hostname coronation.cs.ualberta.ca Hostname coronation.cs.ualberta.ca
IdentitiesOnly true IdentitiesOnly yes
IdentityFile ~/.ssh/id_ed25519 IdentityFile ~/.ssh/id_ed25519
Port 22 Port 22
User emiliko User emiliko

View file

@ -1,4 +1,4 @@
Host ohaton Host ohaton
forwardx11 false forwardx11 no
identitiesonly true identitiesonly yes
port 22 port 22

View file

@ -1,15 +1,15 @@
Host ohaton Host ohaton
ForwardX11 false ForwardX11 no
Hostname ohaton.cs.ualberta.ca Hostname ohaton.cs.ualberta.ca
IdentitiesOnly true IdentitiesOnly yes
IdentityFile ~/.ssh/id_ed25519 IdentityFile ~/.ssh/id_ed25519
Port 22 Port 22
User emiliko User emiliko
Host coronation Host coronation
ForwardX11 false ForwardX11 no
Hostname coronation.cs.ualberta.ca Hostname coronation.cs.ualberta.ca
IdentitiesOnly true IdentitiesOnly yes
IdentityFile ~/.ssh/id_ed25519 IdentityFile ~/.ssh/id_ed25519
Port 22 Port 22
User emiliko User emiliko