[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] Re: poundbang

From: Shawn Betts
Subject: Re: [RP] Re: poundbang
Date: Thu Mar 4 20:49:12 2004
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

John Meacham <address@hidden> writes:

> On Fri, Mar 05, 2004 at 07:42:44AM +1100, twb wrote:
> > Quoth address@hidden (Björn Lindström) on or about Thu, 04 Mar 2004 
> > 14:02:12 +0100:
> > > I think the _clean_ way to do it, would be to have a command line
> > > option, that makes ratpoison execute commands from stdin, so you could
> > > do:
> > > 
> > > #!/whatever/bin/ratpoison -[appropriate_character]
> > 
> > What about
> >  #!/path/ratpoison -c "source -"
> won't work. you may only pass a single option on a #! line. the kernel
> doesn't do any parsing to split up tokens.
> it also is not what you want, #! scripts don't read their commands from
> stdin (otherwise how would you write scripts that interacted with the
> user). the filename is passed as an argument.
> the correct solution is to add a single option
> -f <file> -  read commands from file. 
> then put 
> #!/usr/bin/ratpoison -f
> at the beginning of your files.

I'm not sure I understand the point of being able to use ratpoison
this way. Ratpoison will never have conditionals, looping, or
variables as part of it's command set. So the only thing you'll ever
be able to do is list a bunch of hard-coded commands. Let's also not
forget that if you want to run the sh script 'doit.sh' you can run:

$ doit.sh

if the permissions are setup or

$ sh doit.sh

If you want to run a batch of commands you can always run:

$ ratpoison -c "source <file>"

And if you do it often then you can bind a key or an alias to it and
execute it quickly.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]