GNU bug report logs - #36021
[PATCH] search-paths: 'environment-variable-definition' output for fish

Previous Next

Package: guix-patches;

Reported by: Dan Frumin <dfrumin <at> cs.ru.nl>

Date: Fri, 31 May 2019 10:37:01 UTC

Severity: normal

Tags: patch

Full log


Message #14 received at 36021 <at> debbugs.gnu.org (full text, mbox):

From: Dan Frumin <dfrumin <at> cs.ru.nl>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36021 <at> debbugs.gnu.org
Subject: Re: [bug#36021] [PATCH] search-paths:
 'environment-variable-definition' output for fish
Date: Sun, 2 Jun 2019 11:29:42 +0200
Hi Ludovic,

On 01-06-19 15:10, Ludovic Courtès wrote:
> Hi,
> 
> Dan Frumin <dfrumin <at> cs.ru.nl> skribis:
> 
>> Some background on this patch:
>> Right now whenever I do any Guix operation that requires me to modify
>> environment variables (e.g. installing a Guile library requires me to
>> update $GUILE_LOAD_PATH afterwards), Guix helpful tells me what
>> commands I have to run to update the variables.
> 
> But see <https://issues.guix.gnu.org/issue/35942>.  :-)
> 

I was actually oblivious to the fact that these environment variables can be set up for you automatically in a new shell -- I guess that's because 
both ~/.guix-profile/etc/profile and `guix package --search-paths` output everything in Bash format, so I didn't use it with Fish.

>> However, those commands are currently in bash/POSIX(?) format `export
>> VAR=VALUE`. I've modified the `environment-variable-definition`
>> function to support the syntax for Fish shell as well. I don't know if
>> this method of looking at the $SHELL variable is sound, but it works
>> on my machine.
> 
> “export VAR=VALUE” is actually Bash-specific.  The POSIX way to do it
> is:
> 
>    VAR=VALUE; export VAR
> 
> Would that work with Fish?

Unfortunately not. I wish they'd support more standard features.

Best,
Dan

> 
> If it does, we might just as well take that route as it will also cater
> to other POSIX-compatible shells.
> 
> If not, your patch sounds like the right way.
> 
> Thanks,
> Ludo’.
> 




This bug report was last modified 6 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.