feat: enhance robustness of --confallhosts parsing#199
Open
joshsleeper wants to merge 1 commit intodanielrobbins:masterfrom
Open
feat: enhance robustness of --confallhosts parsing#199joshsleeper wants to merge 1 commit intodanielrobbins:masterfrom
joshsleeper wants to merge 1 commit intodanielrobbins:masterfrom
Conversation
it should now gracefully handle leading whitespace, commented lines, quoted arguments, and known homedir shorthands
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
alternate to #197
closes #198
changes
--confallhostsparsing|| [ -n "$line"]was new to me, I never realized thatread -rwould drop the final line if it didn't end with a newlinevalidation
I churned on this locally by piping in this file, which includes examples for each resolved issue I believe
#and the keywordcontext
I ran into this again recently while setting up a new system and remembered that I'd encountered the lack of
~parsing back when--confallhostsfirst shipped but I failed to actually report it 🥲.found #198 and #197 when looking to see if anyone had tried to fix it yet, and reviewing the PR got me thinking about the problem space and all the various little ways
ssh_configparsing is "fun", several of which I mention in my issue comment here: #198 (comment)after doing the reading and writing the explanation I felt silly and realized I should probably just open a PR that covers all the edge cases I'd brought up.