[Top][All Lists]

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

Re: Re: [Ranger-users] Custom commands and keymapping them

From: David Woodfall
Subject: Re: Re: [Ranger-users] Custom commands and keymapping them
Date: Tue, 4 May 2010 00:15:26 +0100
User-agent: Mutt/1.5.19 (2009-01-05)

On (00:24 04/05/10), Roman Z. <address@hidden> put forth the proposition:
On Mon, May 03, 2010 at 11:08:35PM +0100, David Woodfall wrote:
I want to run a command on either selected directory (first choice)
or a tagged directory:

mkisofs -R -o cdimage.raw %d

map('I', fm.execute_command('mkisofs -R -o cdimage.raw %d'))

is what I have in mind. How do I do this? The %d isn't parsed by
ranger so obviously mkisofs spits out an error.


Don't look back, the lemmings are gaining on you.

Replace %d with . (a dot.)

But I realize that there's a need for an interface to the console, so
you can use %c, %s, etc... *adds to the TODO list*

It would be nice to be able to add those vars to an exe command. I
think the power of ranger would be increased 10 fold (at least)

Here is what I did so far in case people would find it useful:


map('I', fm.execute_command('mkisofs -R -o cdimage.raw .'))
map('B', fm.execute_command('cdrecord dev=/dev/hdc cdimage.raw'))

And also added a 'burn' command in commands.py:

class burn(Command):
        def execute(self):
                self.fm.execute_command('cdrecord dev=/dev/hdc cdimage.raw')

But yeah being able run say burn on any iso and not have to explicitly
name it would be good.


[sorry for sending it directly to you rather than to the mailing list
the first time]

No problem!

Don't look back, the lemmings are gaining on you.

Attachment: pgpzHGPOkyjMU.pgp
Description: PGP signature

reply via email to

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