Re: fish PATH problem

2014-10-13 Thread Dave Kilroy

On 10/10/2014 14:46, Andrew Schulman wrote:


OK, I rolled a new release of fish 2.1.1:

x86:
http://home.comcast.net/~andrex2/cygwin/x86/fish-2.1.1-1.tar.xz
http://home.comcast.net/~andrex2/cygwin/x86/fish-2.1.1-1-src.tar.xz

x86_64:
http://home.comcast.net/~andrex2/cygwin/x86_64/fish-2.1.1-1.tar.xz
http://home.comcast.net/~andrex2/cygwin/x86_64/fish-2.1.1-1-src.tar.xz

Please try it out, and let me know how it works for you.  If it's okay and if 
Konrad
doesn't answer, then I'll adopt the package and put out the new release.  I've
switched to using fish as my default shell now, so I want to see it maintained.

I downloaded both versions and verified that `fish -l` didn't show the 
path issue. Success.



Thanks,

Dave.

--
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



Re: fish PATH problem

2014-10-10 Thread Andrew Schulman
 On 09/10/2014 18:26, Andrey Repin wrote:
  Greetings, Andrew Schulman!
 
  Bad news: the PATH problem is back.  When I run
  C:\cygwin64\bin\fish.exe -l
  I get the same error messages as before on startup, and PATH doesn't
  include /bin /usr/bin /sbin /usr/sbin.
  How are /bin /usr/bin etc. normally added to the PATH?  I don't see any
  logic to do it in /usr/share/fish/config.fish.
  That logic probably should be included.
  At least, bash does that in login files.
 
 
 That was my conclusion as well*. Question is, should fish provide the 
 configuration, or should base-files cover all shells?
 
 Andrew: thanks for confirming. If you're still looking for the logic and 
 where to put it, I suggested something in * as well.

OK, I rolled a new release of fish 2.1.1:

x86:
http://home.comcast.net/~andrex2/cygwin/x86/fish-2.1.1-1.tar.xz
http://home.comcast.net/~andrex2/cygwin/x86/fish-2.1.1-1-src.tar.xz

x86_64:
http://home.comcast.net/~andrex2/cygwin/x86_64/fish-2.1.1-1.tar.xz
http://home.comcast.net/~andrex2/cygwin/x86_64/fish-2.1.1-1-src.tar.xz

It adds the following improvements in /etc/fish/config.fish:

* Prepends /usr/local/bin /bin to PATH.  This solves the PATH errors for me.

* Changes to the home directory in login shells.

* sources all scripts /etc/profile.d/*.fish.  So far I think there are few or 
none of
those, but once fish supports them, some will start to appear, especially if we 
can
get cygport to start creating them.

I think that's the best answer to your question about base-files.  I looked in
/etc/profile to see if it might be made to support fish too, but I don't think 
so.
It's too sh-centric.  fish's syntax is too different.  So if fish supports
/etc/profile.d on its own, then we can just leave it at that.

Please try it out, and let me know how it works for you.  If it's okay and if 
Konrad
doesn't answer, then I'll adopt the package and put out the new release.  I've
switched to using fish as my default shell now, so I want to see it maintained.

Andrew


--
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



Re: fish PATH problem

2014-10-10 Thread Alive
On 08/10/2014 17:08, Dave Kilroy wrote:
 On 08/10/2014 10:57, Andrew Schulman wrote:
 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:
 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.
 Doh! Right. Thanks.


 Does that work. It seemed to have the same issue as noted in the
 following thread https://cygwin.com/ml/cygwin/2014-04/msg00111.html
 
 Dave.
I've tested launcing `fish -l -i` from wincmd. A lot of errors shown.
I think `fish` is not yet optimized to be `default shell` for cygwin.
There are still more works to be done to make it usable as cygwin login
shell.

For a quick comparison, `bash -l -i` and `zsh -l -i` works fine, even
when launched via wincmd. The PATH environment is set up correctly with
them, so that there is no problem to use bash and zsh for cygwin login
shell.


--
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



Re: fish PATH problem

2014-10-10 Thread Andrew Schulman
 On 08/10/2014 17:08, Dave Kilroy wrote:
  On 08/10/2014 10:57, Andrew Schulman wrote:
  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:
  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.
  Doh! Right. Thanks.
 
 
  Does that work. It seemed to have the same issue as noted in the
  following thread https://cygwin.com/ml/cygwin/2014-04/msg00111.html
  
  Dave.
 I've tested launcing `fish -l -i` from wincmd. A lot of errors shown.
 I think `fish` is not yet optimized to be `default shell` for cygwin.
 There are still more works to be done to make it usable as cygwin login
 shell.

Please try the updated fish 2.1.1 package I just posted, and see if it fixes 
those
problems for you.  Exit all running fish shells, then run:

wget http://home.comcast.net/~andrex2/cygwin/$(arch)/fish-2.1.1-1.tar.xz
tar -Jx -C/ -f fish-2.1.1-1.tar.xz

Then try starting fish as a login shell.


--
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



Re: fish PATH problem

2014-10-10 Thread Alive
On 10/10/2014 22:27, Andrew Schulman wrote:
 Please try the updated fish 2.1.1 package I just posted, and see if it fixes 
 those
 problems for you.  Exit all running fish shells, then run:
 
 wget http://home.comcast.net/~andrex2/cygwin/$(arch)/fish-2.1.1-1.tar.xz
 tar -Jx -C/ -f fish-2.1.1-1.tar.xz
 
 Then try starting fish as a login shell.

Yeah, it's great that you've packaged a new version. I'm just curious
with `fish` behavior, so that I install it on my cygwin.

I'd rather stay with standardized `bash` and `zsh` for my shells instead
of experiment with the nonstandard `fish` shell.

--
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



Re: fish PATH problem

2014-10-10 Thread Achim Gratz
Dave Kilroy writes:
 That was my conclusion as well*. Question is, should fish provide the
 configuration, or should base-files cover all shells?

Since fish isn't in Base and deviates quite a bit from the classic
shells in its startup behaviour, I don't really think it would be
appropriate.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

--
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



Re: fish PATH problem

2014-10-09 Thread Dave Kilroy

On 08/10/2014 18:36, Alive4Ever wrote:

On Wednesday, October 08, 2014 11:08:43 AM you wrote:

Does that work. It seemed to have the same issue as noted in the
following thread https://cygwin.com/ml/cygwin/2014-04/msg00111.html

Dave.

It should work, although I don't recommend running cygwin apps directly
via wincmd, unless the underlying shell is invoked as interactive login
shell.
So I just re-tested starting a fish login shell after updating cygwin64. 
As I suspected, fish has not been updated since the thread I quoted (Apr 
2014), and the issue remains (with my install). Google doesn't show the 
maintainer on list since the announcement (Oct 2013), and his e-mail 
bounces. Cc'ing anyway, just in case.

You can find the example of how to invoke cygwin correctly by looking at
Cygwin.bat file on cygwin root directory.

I'm aware of how to invoke login shells and start cygwin, thanks.

Andrew: appreciated if you can confirm whether simply invoking as a 
login shell works for you.



Regards,

Dave.

--
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



Re: fish PATH problem

2014-10-09 Thread Andrew Schulman
 On 08/10/2014 18:36, Alive4Ever wrote:
  On Wednesday, October 08, 2014 11:08:43 AM you wrote:
  Does that work. It seemed to have the same issue as noted in the
  following thread https://cygwin.com/ml/cygwin/2014-04/msg00111.html
 
  It should work, although I don't recommend running cygwin apps directly
  via wincmd, unless the underlying shell is invoked as interactive login
  shell.
 So I just re-tested starting a fish login shell after updating cygwin64. 
 As I suspected, fish has not been updated since the thread I quoted (Apr 
 2014), and the issue remains (with my install). Google doesn't show the 
 maintainer on list since the announcement (Oct 2013), and his e-mail 
 bounces. Cc'ing anyway, just in case.

If fish needs a new maintainer, it looks like not a hard package to
maintain.  It has a simple and up-to-date cygport script, and builds OOTB
with just one small source code patch.

 Andrew: appreciated if you can confirm whether simply invoking as a 
 login shell works for you.

It sort of works.  When I change my shell to /usr/bin/fish in /etc/passwd
and run 

C:\cygwin64\bin\mintty.exe -

I don't get any error messages, as I first reported.  But the environment
isn't set up correctly.  The main problem seems to be that although I'm
running 64-bit cygwin, the directory for 32-bit cygwin is mounted as the
root filesystem:

 ~ cygpath -w /
C:\cygwin

By comparison when I start fish from bash, I get:

aschulma@LC77E1AASCHULMA ~ cygpath -w /
C:\cygwin64

This is a pretty serious problem.  Any thoughts on why it happens?

Andrew


--
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



Re: fish PATH problem

2014-10-09 Thread Andrey Repin
Greetings, Andrew Schulman!

 Andrew: appreciated if you can confirm whether simply invoking as a
 login shell works for you.

 It sort of works.  When I change my shell to /usr/bin/fish in /etc/passwd
 and run 

 C:\cygwin64\bin\mintty.exe -

 I don't get any error messages, as I first reported.  But the environment
 isn't set up correctly.  The main problem seems to be that although I'm
 running 64-bit cygwin, the directory for 32-bit cygwin is mounted as the
 root filesystem:

  ~ cygpath -w /
 C:\cygwin

 By comparison when I start fish from bash, I get:

 aschulma@LC77E1AASCHULMA ~ cygpath -w /
 C:\cygwin64

 This is a pretty serious problem.  Any thoughts on why it happens?

Initial %PATH% problem?


--
WBR,
Andrey Repin (anrdae...@yandex.ru) 09.10.2014, 19:22

Sorry for my terrible english...


--
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



Re: fish PATH problem

2014-10-09 Thread Andrew Schulman
 Greetings, Andrew Schulman!
 
  Andrew: appreciated if you can confirm whether simply invoking as a
  login shell works for you.
 
  It sort of works.  When I change my shell to /usr/bin/fish in /etc/passwd
  and run 
 
  C:\cygwin64\bin\mintty.exe -
 
  I don't get any error messages, as I first reported.  But the environment
  isn't set up correctly.  The main problem seems to be that although I'm
  running 64-bit cygwin, the directory for 32-bit cygwin is mounted as the
  root filesystem:
 
   ~ cygpath -w /
  C:\cygwin
 
  By comparison when I start fish from bash, I get:
 
  aschulma@LC77E1AASCHULMA ~ cygpath -w /
  C:\cygwin64
 
  This is a pretty serious problem.  Any thoughts on why it happens?
 
 Initial %PATH% problem?

Andrey, good catch.  My system %PATH% did indeed include C:\cygwin\bin.

So I removed that, and restarted fish.  Good news:  the system mount points
are right again - they point into C:\Cygwin64, not C:\Cygwin.  That's a
relief!

Bad news: the PATH problem is back.  When I run 

C:\cygwin64\bin\fish.exe -l 

I get the same error messages as before on startup, and PATH doesn't
include /bin /usr/bin /sbin /usr/sbin.

How are /bin /usr/bin etc. normally added to the PATH?  I don't see any
logic to do it in /usr/share/fish/config.fish.

Andrew


--
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



Re: fish PATH problem

2014-10-09 Thread Andrey Repin
Greetings, Andrew Schulman!

 Bad news: the PATH problem is back.  When I run

 C:\cygwin64\bin\fish.exe -l 

 I get the same error messages as before on startup, and PATH doesn't
 include /bin /usr/bin /sbin /usr/sbin.

 How are /bin /usr/bin etc. normally added to the PATH?  I don't see any
 logic to do it in /usr/share/fish/config.fish.

That logic probably should be included.
At least, bash does that in login files.


--
WBR,
Andrey Repin (anrdae...@yandex.ru) 09.10.2014, 21:26

Sorry for my terrible english...


--
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



Re: fish PATH problem [ping Konrad]

2014-10-09 Thread Andrew Schulman
 So I just re-tested starting a fish login shell after updating cygwin64. 
 As I suspected, fish has not been updated since the thread I quoted (Apr 
 2014), and the issue remains (with my install). Google doesn't show the 
 maintainer on list since the announcement (Oct 2013), and his e-mail 
 bounces. Cc'ing anyway, just in case.

The release notes for version 2.1.1
(http://fishshell.com/release_notes.html) show that that release fixed
multiple security vulnerabilities.  If Konrad isn't available to update the
package, then someone else should take over maintainership and upload the
new release.


--
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



Re: fish PATH problem

2014-10-09 Thread Dave Kilroy

On 09/10/2014 18:26, Andrey Repin wrote:

Greetings, Andrew Schulman!


Bad news: the PATH problem is back.  When I run
C:\cygwin64\bin\fish.exe -l
I get the same error messages as before on startup, and PATH doesn't
include /bin /usr/bin /sbin /usr/sbin.
How are /bin /usr/bin etc. normally added to the PATH?  I don't see any
logic to do it in /usr/share/fish/config.fish.

That logic probably should be included.
At least, bash does that in login files.



That was my conclusion as well*. Question is, should fish provide the 
configuration, or should base-files cover all shells?


Andrew: thanks for confirming. If you're still looking for the logic and 
where to put it, I suggested something in * as well.



Regards,

Dave.

* https://cygwin.com/ml/cygwin/2014-04/msg00175.html

--
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



fish PATH problem

2014-10-08 Thread Andrew Schulman
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.


--
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



Re: fish PATH problem

2014-10-08 Thread Alive4Ever
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



Re: fish PATH problem

2014-10-08 Thread Andrew Schulman
 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:
 
 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.

Doh! Right. Thanks.


--
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



Re: fish PATH problem

2014-10-08 Thread Dave Kilroy

On 08/10/2014 10:57, Andrew Schulman wrote:

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:

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.

Doh! Right. Thanks.


Does that work. It seemed to have the same issue as noted in the 
following thread https://cygwin.com/ml/cygwin/2014-04/msg00111.html


Dave.

--
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



Re: fish PATH problem

2014-10-08 Thread Alive4Ever
On Wednesday, October 08, 2014 11:08:43 AM you wrote:
 Does that work. It seemed to have the same issue as noted in the 
 following thread https://cygwin.com/ml/cygwin/2014-04/msg00111.html
 
 Dave.

It should work, although I don't recommend running cygwin apps directly 
via wincmd, unless the underlying shell is invoked as interactive login 
shell.

You can find the example of how to invoke cygwin correctly by looking at 
Cygwin.bat file on cygwin root directory.

--
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