Re: Windows PowerShell and .pl association

2007-09-24 Thread Foo JH
IIRC the spacing issue is a standard problem for all programs. If any 
program (.Net, Java) path has a space, it also has to be quoted.

Suresh Govindachar wrote:
   Glenn asked:
   
(They have taken the pleasant activity of working at a console and
made it miserable drudgery.  In cmd.exe, I had to be careful to use
unix find rather than cmd.exe's find.  In the power-shell, I am 
finding that more unix commands are over-ridden, for example, diff;
I think I'll just prefix all my unix-utility commands with u:  ufind,
ugrep etc.)
   
Is there any compensating benefit to using PowerShell, to
overcome the miserable drudgery that you describe?  Why not
just stick with cmd.exe?

   Before answering the question, there is a bug in the .pl file-asssociation.
   If the path to the .pl file has spaces so that one needs to use
 then the .pl association is not recognized!

   I was not clear about what was miserable drudgery.  I don't mind
   renaming my unix utilities with the prefix u.  It is the
   complicated way of, say, setting an environment variable that's
   painful -- but I don't do that very often.   

   I have just been using PowerShell for a few hours, and so far
   I can continue to use it as cmd.exe (except for the above bug).

   The one big benefit over cmd.exe is being able to use / in path
   names.  I never got used to \.

   Also, _if_ the console/terminal PowerShell Plus supports lots of
   colors, I will be able to use console vim (rather than gvim).

   Today with the power-shell: Right-Click on short-cut to PowerShell
   brings a drop-down menu:

- Properties
   Pick Compatibility Tab
  Hit [X] Run in 256 colors

   However, the result was that colors on the entire desktop got
   messed up!  For example, the Olive Green theme became
   steel-gray!  So I switched back to 16 colors.

   --Suresh

 ___
 Perl-Win32-Users mailing list
 Perl-Win32-Users@listserv.ActiveState.com
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
   

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Windows PowerShell and .pl association

2007-09-24 Thread Suresh Govindachar

   IIRC the spacing issue is a standard problem for all
   programs. If any program (.Net, Java) path has a space,
   it also has to be quoted.

  You misunderstood the problem.  
 
  In PS, c:\no\space\path.pl executes after the Jan's fix.

  In cmd.exe,  c:\path with\space.pl executes

  But in PS, need to add perl:  perl c:\path with\space.pl

  --Suresh


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Windows PowerShell and .pl association

2007-09-23 Thread Suresh Govindachar

Hello,

  In the cmd.exe shell, I can run a .pl file by typing its name.

  However, in the new PowerShell, 

http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx

  I need to prefix the .pl file with perl.  How can one get the
  file association to work in the PowerShell?

  {PS:  see also http://www.powershell.com/plus/ ]

  Thanks,

  --Suresh
 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Windows PowerShell and .pl association

2007-09-23 Thread Jan Dubois
On Sun, 23 Sep 2007, Suresh Govindachar wrote:
 
 Hello,
 
   In the cmd.exe shell, I can run a .pl file by typing its name.
 
   However, in the new PowerShell,
 
 http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx
 
   I need to prefix the .pl file with perl.  How can one get the
   file association to work in the PowerShell?

I don't really know, but one thing to try is adding the .pl extension
to PATHEXT:

set PATHEXT=.pl;%PATHEXT%

Cheers,
-Jan

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Windows PowerShell and .pl association

2007-09-23 Thread Suresh Govindachar

  Jan Dubois wrote:
  On Sun, 23 Sep 2007, Suresh Govindachar wrote:
   
   In the cmd.exe shell, I can run a .pl file by typing its name.
   
   However, in the new PowerShell,
   
   http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx
   
   I need to prefix the .pl file with perl.  How can one get the
   file association to work in the PowerShell?
  
   I don't really know, but one thing to try is adding the .pl extension to 
PATHEXT:
  
  set PATHEXT=.pl;%PATHEXT%

  Right idea -- had to jump through hoops to implement it.
  Feels like writing VBA code!

 get-childitem -path env:pathext  # for copy-paste in next command 

 set-item -path env:pathext -value 
.pl;.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1

  (They have taken the pleasant activity of working at a console and
  made it miserable drudgery.  In cmd.exe, I had to be careful to use
  unix find rather than cmd.exe's find.  In the power-shell, I am 
  finding that more unix commands are over-ridden, for example, diff;
  I think I'll just prefix all my unix-utility commands with u:  ufind,
  ugrep etc.)

  Thanks,

  --Suresh
 

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Windows PowerShell and .pl association

2007-09-23 Thread Suresh Govindachar

  Glenn asked:
  
   (They have taken the pleasant activity of working at a console and
   made it miserable drudgery.  In cmd.exe, I had to be careful to use
   unix find rather than cmd.exe's find.  In the power-shell, I am 
   finding that more unix commands are over-ridden, for example, diff;
   I think I'll just prefix all my unix-utility commands with u:  ufind,
   ugrep etc.)
  
   Is there any compensating benefit to using PowerShell, to
   overcome the miserable drudgery that you describe?  Why not
   just stick with cmd.exe?

  Before answering the question, there is a bug in the .pl file-asssociation.
  If the path to the .pl file has spaces so that one needs to use
then the .pl association is not recognized!

  I was not clear about what was miserable drudgery.  I don't mind
  renaming my unix utilities with the prefix u.  It is the
  complicated way of, say, setting an environment variable that's
  painful -- but I don't do that very often.   

  I have just been using PowerShell for a few hours, and so far
  I can continue to use it as cmd.exe (except for the above bug).

  The one big benefit over cmd.exe is being able to use / in path
  names.  I never got used to \.

  Also, _if_ the console/terminal PowerShell Plus supports lots of
  colors, I will be able to use console vim (rather than gvim).

  Today with the power-shell: Right-Click on short-cut to PowerShell
  brings a drop-down menu:

   - Properties
  Pick Compatibility Tab
 Hit [X] Run in 256 colors

  However, the result was that colors on the entire desktop got
  messed up!  For example, the Olive Green theme became
  steel-gray!  So I switched back to 16 colors.

  --Suresh

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs