Double-quote curl commands to enable substitution in Linux installation guide on zsh #1228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation:
The current unquoted curl commands with substitution used for installing swiftly on Linux fail when executed in the Zsh (Z Shell) environment.
Zsh's default behavior is to treat special characters within an unquoted URL (such as periods, slashes, or the parentheses around
$(uname -m)) as patterns for file matching. When Zsh cannot find a file matching that unusual pattern, it halts execution and returns an error (likezsh: no matches found). This prevents users running Zsh from easily following the installation instructions.Modifications:
Added double-quotes
"around the full URL in the curl -O commands used for downloading the swiftly installer.The updated command now looks like this:
curl -O "https://download.swift.org/swiftly/linux/swiftly-{{ site.data.builds.swiftly_release.version }}-$(uname -m).tar.gz"Double-quotes ensure the shell treats the entire URL as a single, literal string argument for curl, while still allowing the necessary substitution of the architecture via
$(uname -m).Result:
The Linux installation commands are now fully compatible with both the common Bash shell and the widely used Z shell, making the documentation more robust for a broader Linux user base.