You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @fovea1959 - thanks for the suggestion (also TIL that source will find files on your PATH). I like the idea but I'd also like to retain the existing behavior: I believe that with this change argparse.bash would no longer be found when it is (only) in the same directory as the script. Can you suggest a change that retains this behavior?
I cannot suggest such a change (symlinks and lack of brevity are two reasons), but offer that it may not be necessary.
People already counting on that behaviour have user scripts saying source $(dirname $0)/argparse.bash, and those won't break, unless they remove the 'not-on-the-path' argparse.bash next to the user script and do not change their user scripts. And that will only break IF the user script using argparse.bash is not on the path, but was invoked because the user script was symlinked onto the path or invoked by full path.
Offsetting the backwards compatibility issue, making this change will simplify the job for people that use it in multiple places. Updated version? Update once, not in x places.
Perhaps the options are:
make the change with loud documentation about 'if you are using this change and are counting on it being on the path, you need to check your existing scripts'.
leave the code as is, but update the documentation with a 'if you only want to install this in one place, you can do it, just need to remove the $(dirname $0)/ from your user script(s).
I prefer the 1st, but I think the 2nd is palatable?
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
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.
Resolves issue #19.