Also, you can define functions with hooks and such. One of those hooks is running a function whenever the value of a VARIABLE changes, so we could essentially run any other processing code that needs to be run after that variable is changed (any symlinking magic, or anything else like that)
On Thu, Sep 10, 2009 at 11:37 AM, Bodaniel Jeanes <[email protected]> wrote: > I didn't get time to hax on this unfortunately but I did ponder it. One > thing I realised is that, unlike other shells, fish runs a daemon in the > background for sharing global state and information. As such, RVM COULD > actually set environment variables for fish by starting an instance and > setting a global variable which, from what I read, should be available to > ALL other sessions... right? > > > On Tue, Sep 8, 2009 at 10:09 AM, Lachie <[email protected]> wrote: > >> >> any word on how your hax went on this? >> I'm using my hacky approach and its working pretty well for me so far. >> >> On Thu, Sep 3, 2009 at 5:05 PM, Lachie<[email protected]> wrote: >> > pls note you also need this since i refactor'd it >> > >> > >> http://github.com/lachie/dotfiles/blob/500774b3fedc1c56d0e3ebd919dcb480b6dc720a/.config/fish/functions/__bash_env_to_fish.fish >> > >> > :lachie >> > http://plus2.com.au >> > http://smartbomb.com.au >> > http://www.flickr.com/photos/lachie/ >> > >> > >> > >> > On Thu, Sep 3, 2009 at 4:20 PM, Lachie<[email protected]> wrote: >> >> Here is my leet hax for fish rvm. >> >> >> >> >> http://github.com/lachie/dotfiles/blob/master/.config/fish/functions/rvm.fish >> >> >> >> It works without modifying rvm, but its a doity hax. It works by: >> >> 1. writing down what env vars we have now. >> >> 2. in bash: >> >> a. sourcing the rvm functions >> >> b. running the rvm function, passing arguments >> >> c. running env to produce a list of env vars around after that >> >> 3. comparing the list produced in 2 with the list we wrote down in 1. >> >> 4. setting fish env vars based on what's different. setting uses the >> -xg flag. >> >> 5. et voila! >> >> >> >> The real answer is to rewrite most of rvm in ruby allowing queries >> >> returning various (bash, fish) shell-understandable formats. Then wrap >> >> that in shell specific functions which understand the formats and >> >> export environment variables accordingly. >> >> >> >> :lachie >> >> http://plus2.com.au >> >> http://smartbomb.com.au >> >> http://www.flickr.com/photos/lachie/ >> >> >> >> >> >> >> >> On Wed, Sep 2, 2009 at 5:21 PM, Nicholas Faiz<[email protected]> >> wrote: >> >>> >> >>> Python feels like washing your mouth out with soap - it's didactic, >> >>> clean, and ensures you can't say very much. >> >>> >> >>> >> >>> On Sep 2, 2:35 pm, Chris Lloyd <[email protected]> wrote: >> >>>> Use Python. >> >>>> *ducks* >> >>>> >> >>>> 2009/9/2 Bodaniel Jeanes <[email protected]> >> >>>> >> >>>> > r similar, it becomes a nightmare to ensure fish users get all the >> benefit. >> >>>> > 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. >> >>>> > That being said, 1000 line bash gem that works that well is pretty >> >>>> > impressive :) >> >>>> >> >>>> -- >> >>>> chrislloyd.com.au >> >>> >>> >> >>> >> >> >> > >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
