A little annoiance after modifying my .bashrc file to add an alias to edit files

gialloporpora gialloporpora@gmail.com
Wed Jun 20 23:48:00 GMT 2012


Risposta al messaggio di Larry Hall (Cygwin) :

> I'm curious why you query the list for help instead of your original source.


Since, I suppose that the author doesn't know the answer, because I 
suppose, that if he knew the answer would have written it directly in 
article. In past I have always asked in this newsgroup for Cygwin 
related problems, always with good and satisfactory answers, like in 
this occasion
And asking in newsgroup I could easily save the thread archiving it in TB.


> That notwithstanding, the reason you see this is because the alias you found
> and are using is wrong.  From the bash man page:
>
>     There is no mechanism for using arguments in the replacement text.  If
>     arguments are needed, a shell function should be  used  (see  FUNCTIONS
>     below).
>
> The alias you pulled from the web tries to work-around this restriction,
> without much success (not surprisingly).  Use a function something like
> this:
>
> edit ()
> {
>      cygstart "/cygdrive/c/Programmi/Crimson\ Editor/cedt.exe" $(cygpath -w
> "$*")




Thank you very much Larry for you explanation, it works perfectly
Exactly what I am searching for




Sandro








-- 
Sto ascoltando: *The Rolling Stones – Salt Of The Earth * - 
http://bit.ly/MEuiyc
Two things are infinite: the universe and human stupidity; and I'm not 
sure about the universe.



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



More information about the Cygwin mailing list