That's not completely true with fish - if you make gratuitous use of the 'universal' fish environment variables, child processes can effectively change the shell environment (with some exceptions and limitations). That would probably be evil however - the symlink idea makes more sense. Using aliases or fish functions might also be effective.
On Wed, Sep 2, 2009 at 2:45 PM, Clifford Heath <[email protected]>wrote: > > On 02/09/2009, at 2:31 PM, Bodaniel Jeanes wrote: > > I can see why the script isn't written in ruby (since the ruby > > environment will constantly be changing DUE to rvm), but I don't > > like that it is bash. > > In that case, you're still clueless about how it works and why it's in > bash. > It's in bash because a bash *function* (as opposed to script) is the > only way > that a bash command can change the environment of the shell that calls > it. > > Hint: It's not a bash script, because that would run in a subshell, > where the > only environment it can change it the subshell's environment. > > If a similar feature exists in Fish then it'd be a snip to translate. > If not, then a > solution using symlinks might be the only way. > > I've written such bash functions (upwards of 100 lines) for managing the > history of the "cd" command in the past. It's not rocket science. > > Clifford Heath. > > > That being said, 1000 line bash gem that works that well is pretty > > impressive :) > > > > Bo > > > > On Wed, Sep 2, 2009 at 2:23 PM, Mark Ryall <[email protected]> > > wrote: > > rvm does look awesome - seems like it should be easy to create a set > > of fish scripts equivalent to the bash and zsh ones but then the > > script is 1000+ lines. > > > > rvm is one massive bash script that surely could be split into > > smaller pieces that don't necessarily depend on any particular shell > > (surely it could even be written in ruby). > > > > It also had some difficulty building several of the ruby versions - > > 1.8.6 and ree didn't work but ruby 1.9, rubinius or macruby. > > Probably something to do with the version of readline i expect. Did > > anyone have to manually rebuild a newer version of readline or > > something before being able to use 1.8.6? > > > > Mark. > > > > On Wed, Sep 2, 2009 at 12:15 PM, Bodaniel Jeanes <[email protected]> > > wrote: > > keep the ideas coming -- one way or another we all want this! One of > > us should fork it and add each other and we can hack it up asap. I > > plan on starting on saturday... > > > > > > On Wed, Sep 2, 2009 at 11:13 AM, Lachie <[email protected]> wrote: > > > > why not just have an rvm function that outputs a list of stuff (PATH > > etc) for a fish script to interpret? > > > > :lachie > > http://plus2.com.au > > http://smartbomb.com.au > > http://www.flickr.com/photos/lachie/ > > > > > > > > On Wed, Sep 2, 2009 at 11:10 AM, Clifford Heath<[email protected] > > > wrote: > > > > > > Except that won't work for RVM, because unlike Christopher Owen's > > > library of bash functions, rvn relies on being able to change PATH > > > variables in your current shell. > > > > > > If you "bash your fish", then all your bash functions become > > commands > > > in Fish that fire up a bash subshell - and the side-effects are then > > > *not* > > > propagated to your Fish. > > > > > > Clifford Heath. > > > > > > On 02/09/2009, at 11:04 AM, Dylan Egan wrote: > > > > > >> > > >> You might try bashing your fish. > > >> http://christopherowen.id.au/blog/2009/06/05/bash-your-fish/ > > >> > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en -~----------~----~----~----~------~----~------~--~---
