This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ITP: rxvt-W


> Corinna said:
> On Mar 21 12:52, Charles Wilson wrote:
> > I have one concern with that plan, tho: Would the transparent_exe logic
> > ALSO extend to other PATHEXT extensions?  Does 'foo' conflict with
> > 'foo.bat' (and foo.com, foo.vbs, foo.cmd, foo.wsh, ...) or ONLY with
> > 'foo.exe'?
> 
> "foo" doesn't conflict with anything but "foo.exe" and "foo.lnk" (and,
> fwiw, "foo.exe.lnk").  These two suffixes are the only suffixes which
> are hidden to the user in one way or the other.

Okay, good to know. That means 'urxvt.bat' and 'urxvt'(#!/bin/sh) will
not conflict.  We're still left with a possible future conflect where
'rxvt.bat', 'rxvt'(#!/bin/sh), and current/old 'rxvt.exe' are all in the
same directory.  But we can worry that issue when it comes up -- which
may yet be a while.

> > There's one other minor issue, too: the batch file (but not the #!
> > script) would be limited to 9 command-line parameters.
> 
> Really?  I think the cmd shell knows a "shift" command, too.

Sure, but then I'd have to
  (1) compose a command string by explicitly concatenating all
  positional arguments into one big string.
  (2) prepend the target app
  (3) use eval (actually, in cmd.exe just '%var% causes var to be
  expanded and executed)
BUT I'd have to worry about parsing and quoting rules, preserving
embedded spaces in arguments (-fn "Lucida Console-16"), multiple
expansion issues...

Something like the following *might* work, but only if used with cmd /v
or 
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
= 0x01
I don't know how to set delayed expansion from within a batch file...


@echo off 
set A=
if "%1" == "" goto AisPopulated 
for %%f in ( %* ) do set A=!A! %%f
:AisPopulated

REM somehow figure out how to set tgt to proper exe

set launch=%tgt% %A%
%launch%


Yes, it's possible -- but really really prone to error, bugs,
complaints, mailing list traffic. Maybe it's not as hard as I think it
will be, but IMcurrentO it's much better to simply say "use ~/.Xdefaults
and -name variants if needed".

--
Chuck
--
  Charles Wilson
  cygwin at removespam cwilson dot fastmail dot fm


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]