public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* how is cygstart different from cmd /c or how to have cygstart start 'inline'?
@ 2018-12-21 13:15 L A Walsh
  2018-12-21 15:12 ` Brian Inglis
  2018-12-22 10:26 ` cyg Simple
  0 siblings, 2 replies; 4+ messages in thread
From: L A Walsh @ 2018-12-21 13:15 UTC (permalink / raw)
  To: cygwin

Got a program that starts under cygstart, but I'd
like to be able to start it without starting up the program
in a new window..so was trying cmd /c.

I compared env's and noted both PATH and TMP had been
converted back to the backslash using case, so I
did that manually:

if ((usecmd)); then
    export TMP=$(cygpath -w $TMP)
    my newpath=""
    my sep=""
    readarray -t pathar < <(echo -E "$PATH"|tr ":" "\n")
    for p in "${pathar[@]}"; do
        n=$(cygpath -w "$p")
        newpath="$newpath$sep$n"
        #echo -E "newpath=$newpath"
        sep=";"
    done
    export Path=$newpath
fi

But no luck in launching (cygstart case works):

cd "$ldir" && {
    if ((usecmd)); then
        'c:/windows/system32/cmd.exe' /c "$lpath" "${args[@]}"
    else
        cygstart "$lpath" "${args[@]}"
    fi
}


So what else does cygstart do that I might setup
before a "cmd /c"
to get the target to run?

Or anyway to have cygstart run the command with its output in the
current window?

Thanks!
Linda


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-24  6:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-21 13:15 how is cygstart different from cmd /c or how to have cygstart start 'inline'? L A Walsh
2018-12-21 15:12 ` Brian Inglis
2018-12-24 15:31   ` L A Walsh
2018-12-22 10:26 ` cyg Simple

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).