From kfm-devel Wed Dec 19 02:25:47 2001 From: Waldo Bastian Date: Wed, 19 Dec 2001 02:25:47 +0000 To: kfm-devel Subject: Re: starting an app in the current directory X-MARC-Message: https://marc.info/?l=kfm-devel&m=100872849111862 It should now (With todays KDE CVS) be possible to just use: =09Exec=3Dcd %d;vim %f Cheers, Waldo On Sunday 16 December 2001 04:21 am, David Faure wrote: > 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 on= e > 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 ?