[Top][All Lists]

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

Re: [bug-recutils] Value Expressions

From: Jose E. Marchesi
Subject: Re: [bug-recutils] Value Expressions
Date: Thu, 06 Sep 2012 18:11:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

         Yes.  We need more ideas.
    Well I think it should be similar to other GNU utilities.  And I
    think that recset is somewhat analagous to sed and to tr, so the
    syntax ought to be familar to users of those utilies.  Agreed?

Makes sense.  We can actually think about recset as a "fields editor",
which is able to edit both structure and contents:

- Structure editing: adding, renaming and deletion of fields.
- Content editing: setting/modifying the value of fields.

The structure editing is already handled by the -a|-r|-c|-d command line
arguments.  The content editing is for now restricted to set a fixed
constant string as the value of the fields.

In theory the best tool to edit the contents of fields, which are text
strings, would be some text editor.  The text editor of course need to
be operated not-interactively.  Examples of such text editors are ed,
sed and EDLIN (in windows).

So, instead of implementing our own text editor we could allow the user
to use her favorite one.  An additional "filter" operation could work,
which could be mapped to -F for example.  Example:

$ recset -f Email -F 'sed -e "s/foo/bar/g"'

Windows users could use EDLIN.

What do you think?

Jose E. Marchesi         http://www.jemarch.net
GNU Project              http://www.gnu.org

reply via email to

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