ranger-users
[Top][All Lists]
Advanced

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

Re: [Ranger-users] Copy full path name


From: Jostein Berntsen
Subject: Re: [Ranger-users] Copy full path name
Date: Mon, 16 Aug 2010 19:44:09 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On 16.08.10,19:10, Jostein Berntsen wrote:
> On 16.08.10,18:18, Roman Z. wrote:
> > On Mon, Aug 16, 2010 at 03:27:09PM +0200, Jostein Berntsen wrote:
> > > On 16.08.10,12:53, Jostein Berntsen wrote:
> > > > Is there a function that I can use for a key that could copy the full 
> > > > path name of a file, but not the file itself?
> > > > 
> > > 
> > > To answer my own question, I entered these commands in key.py:
> > > 
> > > map('_1', fm.open_console(cmode.OPEN, '!ls %d/%f | clippy'))
> > > map('_2', fm.open_console(cmode.OPEN, '!cat ~/.ranger/tagged | clippy'))
> > > map('_3', fm.open_console(cmode.OPEN, '!less ~/.ranger/tagged'))
> > > 
> > > 
> > > clippy is a bash script that uses KDE's klipper to the output from a 
> > > command. 
> > > 
> > > Jostein
> > > 
> > > 
> > 
> > FYI there is now a function fm.execute_console which executes the
> > command right away, without the need to press enter.
> > 
> > Note that the arguments are swapped though:
> > map('_1', fm.execute_console('!ls %d/%f | clippy', cmode.OPEN))
> > 
> 
> Thanks, will check out this!
> 

I tried the new function and it did not seem to work for command 1  
above. Command 2 and 3 works OK. For command 1 the line '!ls %d/%f | 
clippy' just hangs on screen and nothing happens. I have to stop the 
command with Ctrl-C, and this error message appears: "'NoneType' object 
has not attribute 'Path'". 


Jostein



reply via email to

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