Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
eventualbuddha/fish-nuggets
zmalltalker/fish-nuggets
AdrianTeh/fish-nuggets
CGamesPlay/fish-inwater
Frontend-Denji/fish-nuggets
KirinDave/fish-nuggets
STRML/fish-nuggets
a1ip/fish-nuggets
acook/fish-nuggets
adrianomitre/fish-nuggets
akasim/fish-nuggets
alcarvalho/fish-nuggets
anateus/fish-nuggets
andrewytliu/fish-nuggets
andreyvit/fish-nuggets
ankurcha/fish-nuggets
arudat/fish-nuggets
carlwoodward/fish-nuggets
cha63506/fish-nuggets
chumpalump/fish-nuggets
cjs/fish-nuggets
clemcke/fish-nuggets
denji/fish-nuggets
develop7/fish-nuggets
drbig/fish-nuggets
dz0ny/fish-nuggets
ecerulm/fish-nuggets
edouard-lopez/fish-nuggets
elarkin/fish-nuggets
elektronaut/fish-nuggets
hannesg/fish-nuggets
ilkka/fish-nuggets
inful/fish-nuggets
janlee/fish-nuggets
jasiek/fish-nuggets
jbruggem/fish-nuggets
jdelStrother/fish-nuggets
johnathan79717/fish-nuggets
jonte/fish-nuggets
jspillers/fish-nuggets
k13n/fish-nuggets
kaushikgopal/fish-nuggets
kevin1024/fish-nuggets
khoyee/fish-nuggets
koljakube/fish-nuggets
kthu/fish-nuggets
lunks/fish-nuggets
martinklepsch/fish-nuggets
maxcan/fish-nuggets
maxio89/fish-nuggets
nirvdrum/fish-nuggets
nomothetis/fish-nuggets
phanhaiquang/fish-nuggets
phluan/fish-nuggets
raw-bin/fish-nuggets
rflbras/fish
rickard-von-essen/fish-nuggets
rkst/fish-nuggets
robrix/fish-nuggets
rubycut/fish-inwater
rzyns/fish-nuggets
shell-helpers/fish-nuggets
skalee/fish-nuggets
sleicht/fish
stragu/fish-nuggets
tiagofernandez/fish-nuggets
toddmazierski/fish-nuggets
toru-hamaguchi/fish-nuggets
vaskas/chips
wayneeseguin/fish-nuggets
wesleym/fish-nuggets
yookoala/fish-nuggets
Nothing to show
Choose a base branch
Nothing to show
...
Choose a Head Repository
eventualbuddha/fish-nuggets
zmalltalker/fish-nuggets
AdrianTeh/fish-nuggets
CGamesPlay/fish-inwater
Frontend-Denji/fish-nuggets
KirinDave/fish-nuggets
STRML/fish-nuggets
a1ip/fish-nuggets
acook/fish-nuggets
adrianomitre/fish-nuggets
akasim/fish-nuggets
alcarvalho/fish-nuggets
anateus/fish-nuggets
andrewytliu/fish-nuggets
andreyvit/fish-nuggets
ankurcha/fish-nuggets
arudat/fish-nuggets
carlwoodward/fish-nuggets
cha63506/fish-nuggets
chumpalump/fish-nuggets
cjs/fish-nuggets
clemcke/fish-nuggets
denji/fish-nuggets
develop7/fish-nuggets
drbig/fish-nuggets
dz0ny/fish-nuggets
ecerulm/fish-nuggets
edouard-lopez/fish-nuggets
elarkin/fish-nuggets
elektronaut/fish-nuggets
hannesg/fish-nuggets
ilkka/fish-nuggets
inful/fish-nuggets
janlee/fish-nuggets
jasiek/fish-nuggets
jbruggem/fish-nuggets
jdelStrother/fish-nuggets
johnathan79717/fish-nuggets
jonte/fish-nuggets
jspillers/fish-nuggets
k13n/fish-nuggets
kaushikgopal/fish-nuggets
kevin1024/fish-nuggets
khoyee/fish-nuggets
koljakube/fish-nuggets
kthu/fish-nuggets
lunks/fish-nuggets
martinklepsch/fish-nuggets
maxcan/fish-nuggets
maxio89/fish-nuggets
nirvdrum/fish-nuggets
nomothetis/fish-nuggets
phanhaiquang/fish-nuggets
phluan/fish-nuggets
raw-bin/fish-nuggets
rflbras/fish
rickard-von-essen/fish-nuggets
rkst/fish-nuggets
robrix/fish-nuggets
rubycut/fish-inwater
rzyns/fish-nuggets
shell-helpers/fish-nuggets
skalee/fish-nuggets
sleicht/fish
stragu/fish-nuggets
tiagofernandez/fish-nuggets
toddmazierski/fish-nuggets
toru-hamaguchi/fish-nuggets
vaskas/chips
wayneeseguin/fish-nuggets
wesleym/fish-nuggets
yookoala/fish-nuggets
Nothing to show
Choose a head branch
Nothing to show
Checking mergeability… Don’t worry, you can still create the pull request.
Commits on Mar 24, 2011
Commits on Dec 22, 2011
Instead of running shell script ".rvmrc", it's better to reload rvm t…
…hrough "rvm reload" every time you change to a directory with a ".rvmrc"
Merge pull request #1 from gauravk92/patch-1
Instead of running shell script ".rvmrc", it's better to reload rvm through "rvm reload" every time you change to a directory with a ".rvmrc"
Commits on Jun 11, 2012
Commits on Jun 19, 2012
Commits on Jul 31, 2012
Commits on Aug 06, 2012
Merge pull request #4 from rubycut/patch-1
cd command without arguments should switch to home directory
Commits on Aug 30, 2012
Merge pull request #3 from jdelStrother/patch-1
Include GEM_HOME when copying rvm environment variables
Commits on Apr 02, 2013
Commits on Apr 09, 2013
Merge pull request #7 from jbruggem/master
rvm.fish fails because of color-related vars
Commits on May 09, 2013
Commits on May 13, 2013
Merge pull request #8 from jasiek/master
When .ruby-version or .ruby-gemset are present, rvm reload is invoked on cd.
Commits on Aug 17, 2013
Commits on Nov 02, 2013
Fix a malformed if statement in the function rvm
The rvm function does not execute "rvm reload" when the new directory
contains a .ruby-version file, because the malformed if statement just
looks for a .rvmrc file.

Fish's syntax for if statements with several conditions is the following:
  if begin; CONDITION1; [and|or] CONDITION2; ...; end
rather than:
  if CONDITION1; [and|or] CONDITION2; ...
Commits on Nov 03, 2013
Merge pull request #11 from k13n/rvm
Fix a malformed if statement in the function rvm
Commits on Nov 10, 2013
Commits on Dec 16, 2013
Commits on May 01, 2014
Merge pull request #13 from alcarvalho/master
Fix: entries with space on PATH would break
Commits on May 16, 2014
Update rvm.fish
At least in my environment rvm reload is not enough to make it load the .ruby-version file. I don't know if it has anything to do with the rvm version (I'm using 1.25.25).
Commits on May 18, 2014
Merge pull request #12 from tiagofernandez/patch-1
Use a single test command for detecting .rvmrc, .ruby-version, or .ruby-gemset
Commits on Jul 16, 2014
Commits on Jul 24, 2015
Commits on Sep 14, 2015
Merge pull request #16 from drbig/rvm-fix
Fix GEM_PATH in rvm.fish for fish >= 2.2.0
Commits on Jan 03, 2017
Commits on Feb 03, 2017
Fixes #19 - env data not generated 'cause of bail
rvm crashes out with a warning if `$GEM_HOME/bin` isn't the first $PATH value which then doesn't allow any environment variables to be created for this script to utilize.  RVM will work here by simply placing the value it expects in the beginning of the PATH environment variable for the temporary environment that this is grabbing data from.  Fixes #19
Fixes #18 - alternate RVM installation paths
RVM isn't always installed in the home directory.  This update uses RVM's `scripts/rvm` where-ever it is.

Fixes #18
Commits on Feb 04, 2017
Merge pull request #21 from danielpclark/patch-1
Fixes #18 & #19 - no env data 'cause of bail & alt path
Use regex flag for grep
`grep` has long supported a flag to explicitly state regex is being used with `-E`.  This has been around for well beyond 10 years.  No behavior changes other than providing a fix for issue 17.

Fixes #17
Commits on Feb 08, 2017
Add support for when rvm not in exec path
During a Docker install of RVM the rvm executable isn't found in the
PATH with the which command.  But whereis will return the RVM directory just fine.  This fix will
allow RVM to work with either and fixes Docker support.
Merge pull request #22 from lunks/docker-support
Add support for when RVM's not in exec path
Merge pull request #23 from lunks/else-clause
if which & whereis fail then original path
Commits on Feb 09, 2017
Fixes #17 - container image RVM fix
When using a container such as Docker the grep regex doesn't work with
the backslashes in front of the pipes `\|`.  Applying @ShogunPanda's
fix works across both native and container systems.

See https://github.com/danielpclark/dev-container-base for affected container.
Commits on Feb 11, 2017
Commits on May 18, 2017
Robin Randhawa
Robin Randhawa
Fix PATH mangling for users with 'bin' in their username
Without this a new shell session bombs out with something along the
lines of:

/tmp/rvm.fish.wlqwG02SRu: /home/roscripts/.rvm/bin/rvm: No such file or
directory

Hit by unfortunate user named robin. :)
Commits on May 19, 2017
Merge pull request #26 from raw-bin/master
Fix PATH mangling for users with 'bin' in their username
Commits on Sep 02, 2017
Commits on Sep 09, 2017
Merge pull request #28 from khoyee/rvm-path-fix
rvm: Add ^PATH to the list to grep
Showing with 35 additions and 42 deletions.
  1. +0 −26 functions/cd.fish
  2. +1 −1 functions/gp.fish
  3. +1 −1 functions/gu.fish
  4. +0 −5 functions/parse_git_branch.fish
  5. +0 −5 functions/parse_hg_branch.fish
  6. +33 −4 functions/rvm.fish
View
@@ -1,26 +0,0 @@
-function cd --description "Change working directory"
- # Source a .rvmrc file in a directory after changing to it, if it exists.
- # To disable this fature, set rvm_project_rvmrc=0 in $HOME/.rvmrc
-
- builtin cd "$argv"
- if test "$rvm_project_rvmrc" != 0
- set -l cwd $PWD
- while true
- if contains $cwd "" $HOME "/"
- if test "$rvm_project_rvmrc_default" = 1
- rvm default 1>/dev/null 2>&1
- end
- break
- else
- if test -f "$cwd/.rvmrc"
- . "$cwd/.rvmrc"
- break
- else
- set cwd (dirname "$cwd")
- end
- end
- end
-
- set -e cwd
- end
-end
View
@@ -1,3 +1,3 @@
function gp
- git-publish $argv;
+ gx-publish $argv;
end
View
@@ -1,3 +1,3 @@
function gu
- git update $argv;
+ gx-update $argv;
end
@@ -1,9 +1,4 @@
function parse_git_branch
- # make sure git is installed
- if not which -s git
- return
- end
-
# make sure the directory is a git repo
if not is-git
return
@@ -1,9 +1,4 @@
function parse_hg_branch
- # make sure mercurial is installed
- if not which -s hg
- return
- end
-
# make sure the directory is a mercurial repo
if not is-hg
return
View
@@ -1,11 +1,40 @@
-function rvm -d 'Ruby enVironment Manager'
+function rvm --description='Ruby enVironment Manager'
# run RVM and capture the resulting environment
- set -l env_file (mktemp -t rvm.fish.XXXXXXXXXX)
- bash -c 'source ~/.rvm/scripts/rvm; rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv
+ set --local env_file (mktemp -t rvm.fish.XXXXXXXXXX)
+ # This finds where RVM's root directory is and sources scripts/rvm from within it. Then loads RVM in a clean environment and dumps the environment variables it generates out for us to use.
+ bash -c 'PATH=$GEM_HOME/bin:$PATH;RVMA=$(which rvm);RVMB=$(whereis rvm | sed "s/rvm://");source $(if test $RVMA;then echo $RVMA | sed "s/\/bin\//\/scripts\//";elif test $RVMB; then echo $RVMB | sed "s/rvm/rvm\/scripts\/rvm/"; else echo ~/.rvm/scripts/rvm; fi); rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv
# apply rvm_* and *PATH variables from the captured environment
- and eval (grep '^rvm\|^[^=]*PATH' $env_file | sed '/^[^=]*PATH/y/:/ /; s/^/set -xg /; s/=/ /; s/$/ ;/')
+ and eval (grep -E '^rvm|^PATH|^GEM_PATH|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//')
+ # needed under fish >= 2.2.0
+ and set -xg GEM_PATH (echo $GEM_PATH | sed 's/ /:/g')
# clean up
rm -f $env_file
end
+
+function __handle_rvmrc_stuff --on-variable PWD
+ # Source a .rvmrc file in a directory after changing to it, if it exists.
+ # To disable this feature, set rvm_project_rvmrc=0 in $HOME/.rvmrc
+ if test "$rvm_project_rvmrc" != 0
+ set -l cwd $PWD
+ while true
+ if contains $cwd "" $HOME "/"
+ if test "$rvm_project_rvmrc_default" = 1
+ rvm default 1>/dev/null 2>&1
+ end
+ break
+ else
+ if test -e .rvmrc -o -e .ruby-version -o -e .ruby-gemset
+ eval "rvm reload" > /dev/null
+ eval "rvm rvmrc load" >/dev/null
+ break
+ else
+ set cwd (dirname "$cwd")
+ end
+ end
+ end
+
+ set -e cwd
+ end
+end

Showing you all comments on commits in this comparison.

@danielpclark

This comment has been minimized.

Show comment Hide comment
@danielpclark

danielpclark Feb 4, 2017

Collaborator

Possible fix, not verified.

Collaborator

danielpclark commented on 74ca35e Feb 4, 2017

Possible fix, not verified.