In my ~/.config/fish/config.fish:

    set PATH $PATH /path/to/directory

I don't know about sub-shells, but this works for me on mutliple platforms (OS 
X and Linux)

On Sunday, August 18, 2013 12:25:12 AM Michael Stillwell wrote:
> What's the recommended way to add a directory to $PATH?  It seems like
> a simple task, but I'm having trouble preventing the directory from
> being added multiple times every time I spawn a subshell, and making
> the new path available to child processes...
> 
> I'd also like the same code to work on OS X and Linux.  fish is my
> login shell on both.
> 
> 
> 
> 
> Michael
> 
> ----------------------------------------------------------------------------
> -- Get 100% visibility into Java/.NET code with AppDynamics Lite!
> It's a free troubleshooting tool designed for production.
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
-- 
Nathan DeGruchy
degruchy.org

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to