From 73bd0717532daa079040d8f155e649414782b42b Mon Sep 17 00:00:00 2001 From: makeworld Date: Thu, 19 Nov 2020 20:49:16 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Use=20single=20quotes=20for=20co?= =?UTF-8?q?mmands=20and=20paths=20in=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ config/default.go | 28 ++++++++++++++++------------ default-config.toml | 28 ++++++++++++++++------------ 3 files changed, 35 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc9d33e..97df23e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated [go-gemini](https://github.com/makeworld-the-better-one/go-gemini) to v0.9.1 to support CN-only wildcard certs - Preformatted text is now light yellow by default +### Fixed +- Single quotes are used in the default config for commands and paths so that Windows paths with backslashes will be parsed correctly + ## [1.6.0] - 2020-11-04 ### Added diff --git a/config/default.go b/config/default.go index 6329539..d1c5c98 100644 --- a/config/default.go +++ b/config/default.go @@ -28,14 +28,15 @@ auto_redirect = false # # The best to define a command is using a string array. # Examples: -# http = ["firefox"] -# http = ["custom-browser", "--flag", "--option=2"] -# http = ["/path/with spaces/in it/firefox"] +# http = ['firefox'] +# http = ['custom-browser', '--flag', '--option=2'] +# http = ['/path/with spaces/in it/firefox'] # -# Using just a string will also work, but it is deprecated, -# and will degrade if you use paths with spaces. +# Note the use of single quotes, so that backslashes will not be escaped. +# Using just a string will also work, but it is deprecated, and will degrade if +# you use paths with spaces. -http = "default" +http = 'default' # Any URL that will accept a query string can be put here search = "gemini://gus.guru/search" @@ -58,7 +59,8 @@ max_width = 100 # 'downloads' is the path to a downloads folder. # An empty value means the code will find the default downloads folder for your system. # If the path does not exist it will be created. -downloads = "" +# Note the use of single quotes, so that backslashes will not be escaped. +downloads = '' # Max size for displayable content in bytes - after that size a download window pops up page_max_size = 2097152 # 2 MiB @@ -71,16 +73,17 @@ emoji_favicons = false [auth] # Authentication settings +# Note the use of single quotes for values, so that backslashes will not be escaped. [auth.certs] # Client certificates # Set domain name equal to path to client cert -# "example.com" = "mycert.crt" +# "example.com" = 'mycert.crt' [auth.keys] # Client certificate keys # Set domain name equal to path to key for the client cert above -# "example.com" = "mycert.key" +# "example.com" = 'mycert.key' [keybindings] @@ -94,18 +97,19 @@ shift_numbers = "!@#$%^&*()" [url-handlers] # Allows setting the commands to run for various URL schemes. # E.g. to open FTP URLs with FileZilla set the following key: -# ftp = "filezilla" +# ftp = 'filezilla' # You can set any scheme to "off" or "" to disable handling it, or # just leave the key unset. # # DO NOT use this for setting the HTTP command. # Use the http setting in the "a-general" section above. # -# NOTE: These settings are override by the ones in the proxies section. +# NOTE: These settings are overrided by the ones in the proxies section. +# Note the use of single quotes, so that backslashes will not be escaped. # This is a special key that defines the handler for all URL schemes for which # no handler is defined. -other = "off" +other = 'off' [cache] diff --git a/default-config.toml b/default-config.toml index 9ac0d21..b9ec3d3 100644 --- a/default-config.toml +++ b/default-config.toml @@ -25,14 +25,15 @@ auto_redirect = false # # The best to define a command is using a string array. # Examples: -# http = ["firefox"] -# http = ["custom-browser", "--flag", "--option=2"] -# http = ["/path/with spaces/in it/firefox"] +# http = ['firefox'] +# http = ['custom-browser', '--flag', '--option=2'] +# http = ['/path/with spaces/in it/firefox'] # -# Using just a string will also work, but it is deprecated, -# and will degrade if you use paths with spaces. +# Note the use of single quotes, so that backslashes will not be escaped. +# Using just a string will also work, but it is deprecated, and will degrade if +# you use paths with spaces. -http = "default" +http = 'default' # Any URL that will accept a query string can be put here search = "gemini://gus.guru/search" @@ -55,7 +56,8 @@ max_width = 100 # 'downloads' is the path to a downloads folder. # An empty value means the code will find the default downloads folder for your system. # If the path does not exist it will be created. -downloads = "" +# Note the use of single quotes, so that backslashes will not be escaped. +downloads = '' # Max size for displayable content in bytes - after that size a download window pops up page_max_size = 2097152 # 2 MiB @@ -68,16 +70,17 @@ emoji_favicons = false [auth] # Authentication settings +# Note the use of single quotes for values, so that backslashes will not be escaped. [auth.certs] # Client certificates # Set domain name equal to path to client cert -# "example.com" = "mycert.crt" +# "example.com" = 'mycert.crt' [auth.keys] # Client certificate keys # Set domain name equal to path to key for the client cert above -# "example.com" = "mycert.key" +# "example.com" = 'mycert.key' [keybindings] @@ -91,18 +94,19 @@ shift_numbers = "!@#$%^&*()" [url-handlers] # Allows setting the commands to run for various URL schemes. # E.g. to open FTP URLs with FileZilla set the following key: -# ftp = "filezilla" +# ftp = 'filezilla' # You can set any scheme to "off" or "" to disable handling it, or # just leave the key unset. # # DO NOT use this for setting the HTTP command. # Use the http setting in the "a-general" section above. # -# NOTE: These settings are override by the ones in the proxies section. +# NOTE: These settings are overrided by the ones in the proxies section. +# Note the use of single quotes, so that backslashes will not be escaped. # This is a special key that defines the handler for all URL schemes for which # no handler is defined. -other = "off" +other = 'off' [cache]