2
As I understand, cygstart
associates its argument with the windows standard program set for that case.
But I want to behave my cygwin different than its host in certain cases.
E.g.
alias open='cygstart'
open some.pdf
should open the pdf with SumatraPDF instead of AcrobatReader, since it's more usefull to me when I'm working on cygwin.
There is a --action
option for open to specify a non default behavior, but that's too much typing.
So is there a way to configure open? Maybe by means of a config file or exporting a variable?
EDIT
The --action/-a
doesn't seem to work.
$ open --action=sumatraPDF some.pdf
Unable to start 'some.pdf': There is no application associated with the given file name extension.
Where "too much typing"?? Define your --action in your alias. – Maximus – 2013-05-31T14:25:02.517
I do not just
open
pdf files, alsoopen .
or sth other files, so I can't change the alias. – mike – 2013-05-31T14:31:17.633@mike: Cygstart is for invoking a registered Windows handler for non-executable files. If you want to use an alternate program, have you simply tried
<path to program.exe> <path to file to be opened>
? – Karan – 2013-06-01T06:48:59.163