X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:from:to:cc:subject:date:in-reply-to
	:references:mime-version:content-transfer-encoding:content-type;
	 q=dns; s=default; b=t/PS3s+Qe3b7PlVcHUD5t6LBdXXtrtk0PBcHUjEXeKi
	0ptIY/SQMyIn7SQLfJja0787mw4eHVIlQ4I8/hkOjSsEUkUmgoaWxUivuSByjosB
	mDPkgUp8fjc9O9cbSr6x28BCjEjAqkN3FeY6uPt030hjg+H2Ay8PAQADOCTE0ul0
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:from:to:cc:subject:date:in-reply-to
	:references:mime-version:content-transfer-encoding:content-type;
	 s=default; bh=0S3BmKSLqgYHGcKfoAwPeTuV6CE=; b=XA0p94W2PTSBN1CWq
	Kg/f83iG2RRT8SItQHvKTn+Vs2W7Qjl7I3M+cUMSWr8lO8iHWDc60jSVBNF0xWbj
	xuGq1GXqluJhKB0e2f7swdQgK5pMbKKuCPOLOJQ8+v6t/GId89zI1TsPB+/3H7tO
	bqO4t8+dUoAuGHKgUdxRa6UJuw=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2
X-HELO: BLU004-OMC1S28.hotmail.com
X-TMN: [QUj3YIgAxbqJPotziul+Zy4wIsdYFhRO]
Message-ID: <BLU436-SMTP370BD9033BAFA915C06FEFE4A30@phx.gbl>
From: Alive4Ever <alive4ever@live.com>
To: cygwin@cygwin.com
CC: Andrew Schulman <schulman.andrew@epa.gov>
Subject: Re: fish PATH problem
Date: Wed, 8 Oct 2014 16:51:46 +0700
User-Agent: KMail/4.13.3 (Linux/3.13.0-36-generic; KDE/4.13.3; x86_64; ; )
In-Reply-To: <8du93aldjf5p3r29dcibokhu4dgps0lv21@4ax.com>
References: <8du93aldjf5p3r29dcibokhu4dgps0lv21@4ax.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-IsSubscribed: yes

On Wednesday, October 08, 2014 05:13:54 AM Andrew Schulman wrote:
> When I try to start fish directly from the Windows shell instead of from
> bash, I get a boatload of errors, like this:
> 
> ===
> /usr/share/fish/functions/type.fish (line 14):  if not getopt -T > /dev/null
>                                                               ^
> in function 'type',
>         called on standard input,
>         with parameter list '-p command-not-found'
> 
> in function '__fish_command_not_found_setup',
>         called on line 2 of file '/home/andrex/.config/fish/functions/fish_promp
> t.fish',
>         with parameter list 'cut'
> 
> in event handler: handler for generic event 'fish_command_not_found'
> 
> /usr/share/fish/functions/type.fish (line 26):          if not getopt $options $
> argv >/dev/null
>                                                                       ^
> in function 'type',
>         called on standard input,
>         with parameter list '-p command-not-found'
> 
> in function '__fish_command_not_found_setup',
>         called on line 2 of file '/home/andrex/.config/fish/functions/fish_promp
> t.fish',
>         with parameter list 'cut'
> 
> in event handler: handler for generic event 'fish_command_not_found'
> ===
> 
> and so on.  The problem seems to be that the PATH isn't set correctly.  PATH
> doesn't include /bin or /usr/bin:
> 
> ===
> andrex@ > echo $PATH
> fish: Unknown command '__fish_pwd'
> Standard input: echo $_ " "; __fish_pwd
>                              ^
> in command substitution
>         called on standard input,
> 
> /win/c/Program Files/Common Files/Microsoft Shared/Microsoft Online Services /wi
> n/c/Program Files (x86)/Common Files/Microsoft Shared/Microsoft Online Services
> /win/c/Windows/system32 /win/c/Windows /win/c/Windows/System32/Wbem /win/c/Windo
> ws/System32/WindowsPowerShell/v1.0
> ===
> 
> If I edit /etc/fish/config.fish and add:
> 
> set PATH /bin /usr/bin $PATH
> 
> then fish starts normally.  Should something like this be added to
> /etc/fish/config.fish or /usr/share/fish/config.fish?
> 
> This matters because if I want to make fish my default shell, I need it to start on
> its own with a usable PATH set.
> 
> Thanks,
> Andrew.

I suggest you to read fish manual page, and find how to invoke fish as login 
shell. On bash and zsh, there is '-l' flag so that they behave with fresh 
environment variables.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

