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: Roman Z.
Subject: Re: [Ranger-users] Copy full path name
Date: Mon, 16 Aug 2010 18:18:33 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

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




reply via email to

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