-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite chruby-fish in fish #39
Merged
Merged
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
35c3dfd
Rewrite chruby-fish in fish
bouk 620d81d
Remove trailing slash from opt rubies
bouk ec6a3ed
travis: Upgrade macOS version
bouk 7c76fa8
Attempt to copy the pre-installed rubies
bouk 6b3b954
Use travis' ruby binaries url
bouk cf4016b
Try to remove rvm again
bouk 7420edf
Use rvm again but hardcode version
bouk 2f7851d
test: Upgrade fishtape to v2.1.2
bouk 624e1f8
Add in port of chruby_auto
bouk 8fb7bab
Use quotes to avoid error when variable is empty
bouk d82c2ee
Run fish_indent on all files
bouk 6a0c1f2
Bump version to 1.0.0
bouk e0871f7
Use auto-loading
bouk 1fb486e
Remove all use of external commands
bouk 1b9c72e
Pipe to source
bouk 75b5659
Update README
bouk 47d53a5
Use vendor_conf.d
bouk 01bce29
Address comments
bouk 276d6ad
Replace Travis with GitHub Actions
bouk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
function chruby_auto -e fish_prompt | ||
test "$CHRUBY_AUTO_DISABLE" = 1; and return | ||
set -l dir $PWD/ | ||
while test -n "$dir" | ||
set dir (string split -r -m1 / $dir)[1] | ||
if test -f "$dir/.ruby-version"; and read -l ruby_version <"$dir/.ruby-version" | ||
if test $ruby_version = "$RUBY_AUTO_VERSION" | ||
return | ||
end | ||
set -g RUBY_AUTO_VERSION $ruby_version | ||
chruby $ruby_version | ||
return $status | ||
end | ||
end | ||
|
||
if test -n "$RUBY_AUTO_VERSION" | ||
chruby_reset | ||
set -e RUBY_AUTO_VERSION | ||
end | ||
end |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably a good idea to add a note to the README about the minimum supported Fish version, given that we're now using some built-in functions that only became available in later versions of Fish.
I'm fine with setting the minimum supported version to the latest stable release of Fish. If others find that things work on their version, I'd accept PRs reducing the minimum supported version based on their feedback.