[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: starting an app in the current directory
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-12-16 12:21:42
[Download RAW message or body]

On Sunday 16 December 2001 08:44, Jerome Yuzyk wrote:
> > > > Solution is simple, change the Exec line to
> > > > sh -c "cd %d ; vim %f"
> > >
> > > I tried this in the Menu Editor with gvim but %d and %f don't get
> > > through.
> >
> > Err, that's a bit vague. Did the .desktop file get modified ?
> > (see ~/.kde/share/applnk/*/gvim.desktop or vim.desktop)
> > What happens exactly ?
> 
> From the K menu gvim tries to open the file "~/%f"

Ouch. Indeed. That's a bug in klauncher.
Waldo: klauncher's  KLauncher::createArgs() assumes that %f and other
%blah parameters are whole arguments (e.g. in "vim %f", %f is an
argument in itself).
This breaks with command lines such as sh -c "cd %d ; vim %f"
The "parser" in createArgs rightfully notices 3 arguments, the third one
being "cd %d ; vim %f", but then no substitution happens in there.
Can KLauncher use the search-n-replace code from KRun, on each
argument, instead of looking for specific arguments like %f ?
 
-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic