From 2f1959a28b40e96e3367d64f48608fb8c3d7b20c Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Wed, 17 Jul 2024 21:57:55 -0600 Subject: [PATCH] Parser: switch true/false to yes/no --- README.md | 4 ++-- src/main.py | 2 +- tests/all_inclusive/readme_quickstart.out | 8 ++++---- tests/ssh_props/case_insensitive.out | 4 ++-- tests/templates/templates.out | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 91cbec8..b669af6 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ Will generate: ```sshconfig Host ohaton: - ForwardX11 false + ForwardX11 no Hostname ohaton.cs.ualberta.ca IdentitiesOnly yes IdentityFile ~/.ssh/id_ed25519 @@ -140,7 +140,7 @@ Host ohaton: User emiliko Host coronation: - ForwardX11 false + ForwardX11 no Hostname coronation.cs.ualberta.ca IdentitiesOnly yes IdentityFile ~/.ssh/id_ed25519 diff --git a/src/main.py b/src/main.py index d6e79e2..4123aeb 100644 --- a/src/main.py +++ b/src/main.py @@ -132,7 +132,7 @@ def to_ssh_config_string(parse): for key, values in keys.items(): for value in values: 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: lines.append(f"\t{key} {value}") diff --git a/tests/all_inclusive/readme_quickstart.out b/tests/all_inclusive/readme_quickstart.out index 0d64511..a5915e3 100644 --- a/tests/all_inclusive/readme_quickstart.out +++ b/tests/all_inclusive/readme_quickstart.out @@ -1,15 +1,15 @@ Host ohaton - ForwardX11 false + ForwardX11 no Hostname ohaton.cs.ualberta.ca - IdentitiesOnly true + IdentitiesOnly yes IdentityFile ~/.ssh/id_ed25519 Port 22 User emiliko Host coronation - ForwardX11 false + ForwardX11 no Hostname coronation.cs.ualberta.ca - IdentitiesOnly true + IdentitiesOnly yes IdentityFile ~/.ssh/id_ed25519 Port 22 User emiliko diff --git a/tests/ssh_props/case_insensitive.out b/tests/ssh_props/case_insensitive.out index d2f14de..f220a86 100644 --- a/tests/ssh_props/case_insensitive.out +++ b/tests/ssh_props/case_insensitive.out @@ -1,4 +1,4 @@ Host ohaton - forwardx11 false - identitiesonly true + forwardx11 no + identitiesonly yes port 22 diff --git a/tests/templates/templates.out b/tests/templates/templates.out index 0d64511..a5915e3 100644 --- a/tests/templates/templates.out +++ b/tests/templates/templates.out @@ -1,15 +1,15 @@ Host ohaton - ForwardX11 false + ForwardX11 no Hostname ohaton.cs.ualberta.ca - IdentitiesOnly true + IdentitiesOnly yes IdentityFile ~/.ssh/id_ed25519 Port 22 User emiliko Host coronation - ForwardX11 false + ForwardX11 no Hostname coronation.cs.ualberta.ca - IdentitiesOnly true + IdentitiesOnly yes IdentityFile ~/.ssh/id_ed25519 Port 22 User emiliko