[Top][All Lists]

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

Re: Re: Re: Re: [Ranger-users] is there a way to quickly "mark" by patte

From: Roman Z.
Subject: Re: Re: Re: Re: [Ranger-users] is there a way to quickly "mark" by pattern?
Date: Wed, 28 Apr 2010 22:53:26 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hmm I thought I sent this mail earlier, but it looks like it didn't
arrive to the mailing list so I'll try again.  This was the content:

> Well I just tried using the recode app but it doesn't change anything.
> How would I go about specifying that in ~/mail all files should be
> opened with mutt?

If ranger recognizes the filetype as "mail/<something>", you
could use:

        if f.filetype.startswith('mail'):

If it doesn't,.. you could check for the directory, yeah.

        import os.path
        if f.path.startswith(os.path.expanduser('~/mail')):

>By the way I also tried to implement a ':file' command, not very
>successfully, to print filetype, but I'll make a new thread about that.

class file(Command):
        def execute(self):
                current_file = self.fm.env.cf

you could also simply run this command:
:eval fm.env.cf.filetype

reply via email to

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