[Top][All Lists]
[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 19:57:05 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Mon, Aug 16, 2010 at 07:44:09PM +0200, Jostein Berntsen wrote:
> 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
>
Looks like you've run into a bug.
Please run ranger with "ranger --debug", reproduce the error and give
me the detailed error message, it would make it a lot easier for me to
find the cause.
Also, I believe you want 'echo %d/%f | clippy', not ls (?)
- [Ranger-users] Copy full path name, Jostein Berntsen, 2010/08/16
- Re: [Ranger-users] Copy full path name, Jostein Berntsen, 2010/08/16
- Re: [Ranger-users] Copy full path name, Roman Z., 2010/08/16
- Re: [Ranger-users] Copy full path name, Jostein Berntsen, 2010/08/16
- Re: [Ranger-users] Copy full path name, Jostein Berntsen, 2010/08/16
- Re: [Ranger-users] Copy full path name,
Roman Z. <=
- Re: [Ranger-users] Copy full path name, Jostein Berntsen, 2010/08/16
- Re: [Ranger-users] Copy full path name, Jostein Berntsen, 2010/08/16
- Re: [Ranger-users] Copy full path name, Roman Z., 2010/08/16
- Re: [Ranger-users] Copy full path name, Jostein Berntsen, 2010/08/16
- Re: [Ranger-users] Copy full path name, Roman Z., 2010/08/16
- Re: [Ranger-users] Copy full path name, Jostein Berntsen, 2010/08/16
- Re: [Ranger-users] Copy full path name, Roman Z., 2010/08/16
- Re: [Ranger-users] Copy full path name, Jostein Berntsen, 2010/08/16