Repository navigation
Fix ssh completions and ssh provided hostnames - #4104
Merged
Merged
Conversation
krader1961
reviewed
Jun 8, 2017
| set -l new_paths | ||
| for path in $paths | ||
| # Guard against echo command complaining on zero wildcard matches | ||
| if test (eval "count $path") -gt 0 |
Contributor
There was a problem hiding this comment.
Use set to inhibit the glob match failure:
set -l expanded_path
eval set expanded_path (echo $path)
for path in $expanded_path
This is a good example for why we should implement the proposed glob command.
Contributor
Author
There was a problem hiding this comment.
Perfect. Thank you. I have amended the commit.
krader1961
reviewed
Jun 8, 2017
| eval set expanded_path (echo $path) | ||
| for path in $expanded_path | ||
| # Resolve "relative" paths in accordance to ssh path resolution | ||
| if string match -v '/*' $path >/dev/null |
Contributor
There was a problem hiding this comment.
Rather than redirect the output use the -q flag.
Contributor
Author
There was a problem hiding this comment.
Thank you. Fixed.
Contributor
|
Other than one minor nit about using |
Member
|
@krader1961: That was the only thing I noticed, so LGTM. And yes, that |
Member
|
Merged, thanks! I'm working on a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is a quick patch. Very sorry about missing this, but the ssh provided hostnames did not include the root ssh config – only the hostnames discovered through files included with the
Includedirective.Also, if an
Includedirective contained a wildcard which resolved to nothing,echowould complain which this patch fixes as well.