2

I want to make Krusader User Action which lists selected files. I know I can do it in terminal like ls -1 > list.txt and than delete unwanted. But I'm looking something like gedit newDoc.txt < %aList("Selected")%.

I checked Gedit help and Google. Did not found how to send text in Gedit, only how to open new documents or existing documents. Is my idea possible at all?

When I try gedit newDoc newText it creates two tabs with name "newDoc" and "newText".

ps: how to list files in current dir with full paths like in TotalCommander?

UPD:
%aList("Selected")% | gedit - — does not work

1 Answer 1

1

Indicate that gedit is supposed to read from standard input, by specifying - as an argument:

ls | gedit -

To list absolute paths:

printf "$PWD/%s\n" * | gedit -

$PWD contains the absolute path of the current directory.

I don't know what krusader is, but assuming a krusader user action is like a Nautilus action, you might have to wrap the command in sh -c, and perhaps escape %:

sh -c 'printf "$PWD/\%s\n" * | gedit -'

Replace * with appropriate placeholders (which would be %F in Nautilus Actions.)

1
  • Yes, good general advice, but not work in Krusader, may be some bug.
    – mevsme
    Commented May 14, 2015 at 6:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .