Pass it as an argument:

function foo -a PASSWORD_STORE_DIR
  echo "PSD: " $PASSWORD_STORE_DIR
end

function passc --wraps pass
  set -l PASSWORD_STORE_DIR ~/.password-store-other/   # no -x
  echo "PSDL: " $PASSWORD_STORE_DIR
  foo $PASSWORD_STORE_DIR
end

On Wed, Mar 16, 2016 at 7:31 AM, Marcin Zajączkowski <msz...@wp.pl> wrote:

> Hi,
>
> I have a function which sets a variable and call another function:
>
> function foo
>   echo "PSD: " $PASSWORD_STORE_DIR
> end
>
> function passc --wraps pass
>   set -lx PASSWORD_STORE_DIR ~/.password-store-other/
>   echo "PSDL: " $PASSWORD_STORE_DIR
>   foo
> end
>
> When `passc` is called the value is not visible in `foo` (I thought that
> -x should do it). I works with -g, but I don't want to make it global.
> How can I achieve it?
>
> Marcin
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>



-- 
*Glenn Jackman*
Senior Software Developer

*Pythian - Love your data*
jack...@pythian.com
Tel: +1 613 565 8696 Ext. 1478
Mobile: +1 613 808 4984
www.pythian.com

-- 


--



------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to