Using nosleep with wrappers

Andrew Schulman schulman.andrew@epamail.epa.gov
Wed Oct 17 03:03:00 GMT 2012


> On Mon, Oct 15, 2012 at 12:34 PM, Angelo Graziosi  wrote:
> > In my .bashrc I have something like this:
> >
> > xf()
> > {
> >     LANG=''\
> >     /usr/bin/xfig -specialtext -latexfonts -startlatexFont default \
> >         "$@" 2>/dev/null
> > }
> >
> > but, trying
> >
> > $ nosleep xf
> > nosleep: Error: failed to execute command: xf
> >
> > The same occurs for
> >
> > picasa()
> > {
> >     TEMP=/home/$USER/Temp TMP=/home/$USER/Temp \
> >     cyg-wrapper.sh "/WinXP/Programmi/Google/Picasa3/Picasa3.exe" \
> >         "$@" 2>/dev/null
> > }
> >
> >
> > Is there some tricks to have nosleep working with wrappers like the above?
> 
> Hi Angelo,
> You'll probably have to invoke bash explicitly; something like this (not tested)
> 
> nosleep bash -c xf

Right.  nosleep will run a command, which has to be an executable file that
lives somewhere in your PATH.  You're trying to use nosleep to run functions,
which are internal objects in bash.

Csaba's suggestion may work.  Or, you could put the commands into separate bash
scripts that live in your PATH.


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