This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: fish PATH problem
- From: Alive4Ever <alive4ever at live dot com>
- To: cygwin at cygwin dot com
- Cc: Andrew Schulman <schulman dot andrew at epa dot gov>
- Date: Wed, 8 Oct 2014 16:51:46 +0700
- Subject: Re: fish PATH problem
- Authentication-results: sourceware.org; auth=none
- References: <8du93aldjf5p3r29dcibokhu4dgps0lv21 at 4ax dot com>
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