[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bulk] Re: shell-command - missing shell-quote-argument for program?

From: Thomas Link
Subject: Re: [Bulk] Re: shell-command - missing shell-quote-argument for program?
Date: Fri, 13 Oct 2006 23:20:52 +0200
User-agent: Thunderbird (Windows/20060909)

Thomas, could you give an example of what txt could be here?

All of this can be customized via the filesets-commands variable. This really is just a proposal for a hopefully useful command. It's not essential.

The call originates in filesets-run-cmd that runs a command as defined in filesets-commands on the files belonging to a fileset. filesets-run-cmd can be called via the menu or interactively from the command line. A command can be either a function or a string (which is interpreted as name of a shell command). By default, the following commands are defined:

    - Query Replace
    - Query Replace (regexp)
    - Grep <<selection>>
    - Run Shell Command

The command in question is the last one on the list, which could be used for running rarely used shell commands that aren't worth customizing filesets-commands.

If you look at filesets-commands, you'll see that "Run Shell Command" is defined as (filesets-cmd-shell-command (filesets-cmd-shell-command-getargs)), where filesets-cmd-shell-command-getargs does nothing but query the user for a shell command. So, txt is the user input, i.e. some text/string like "grep foo %s".

BTW in filesets-commands, filesets uses <<file-name>> to insert the buffer's filename, so this is a minor inconsistency but %s is shorter & more convenient in this situation.


___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]