[kde-linux] kate plugins and external commands not working
Donatas G.
dgvirtual at akl.lt
Thu May 11 18:48:06 UTC 2006
2006 m. gegužė 10 d., trečiadienis 10:49, Bram Schoenmakers rašė:
> You're missing an ending quote at the end of the trap line at the beginning
> of the script. Fix that and your script just works.
Hey, thank you! It does run from the command line. However, when I paste it's
contents into the External Tools dialog, it no longer work. It displays an
error message
Failed to expand the command '#!/bin/bash
infile=/tmp/$$.in
outfile=/tmp/$$.out
# Clean up when done or when aborting
trap "rm -f $outfile; rm -f $infile" 0 1 2 3 15
katedoc=$( dcop 'kate*')
# Get the active document number
doc=$( dcop $katedoc KateDocumentManager activeDocumentNumber)
# Get the current text from kate
dcop $katedoc EditInterface#$doc text > $infile
# Run the text through sed
cat $infile | sed 's/vartotoj/naudotoj/g' > $outfile
# get the sed'ed text back in the editor document
dcop $katedoc EditInterface#$doc setText "`cat $outfile`"'.
I don't get it....
--
Donatas Glodenis
http://dg.lapas.info
More information about the kde-linux
mailing list