[Top][All Lists]

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

Re: [Gnu-arch-users] tla one liners

From: Harald Meland
Subject: Re: [Gnu-arch-users] tla one liners
Date: Mon, 06 Sep 2004 11:33:44 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

[Zenaan Harkness]

> On Mon, 2004-09-06 at 14:41, Paul Pelzl wrote:
>> On Mon, Sep 06, 2004 at 09:54:52AM +1000, Zenaan Harkness wrote:
>> > I find tlacheck particularly useful, since I usually forget to run
>> > tree-lint before a commit,
>> You might prefer to make an alias for "tla commit --strict" to prevent
>> commit on tree-lint errors.  (Why isn't --strict the default?)
> Thank you very much. That's very useful.
> I was wondering just that myself today.

I don't have any experience with "commit --strict" (and haven't got
the time to study the code right now), but by its description it
sounds like it's the same effect you get by setting

  untagged-source unrecognized

in {arch}/=tagging-method .  If that is indeed the case, then making
commit use --strict by default would defy the purpose of allowing
"untagged-source" to be anything but "unrecognized".

> Also, I just discovered, you can't properly combine more than one
> command into an alias, since the output of the first command(s)
> will not be included in the pipe to less (very common obviously,
> eg. for tla changes --diffs).

You can do this with an alias -- but you need to execute the commands
as a group, or in a subshell.  In e.g. bash this would be:

  # As "group command":
  alias tlacheck='{ tla tree-lint; tla changes --diffs; }'

  # As subshell:
  alias tlacheck='(tla tree-lint; tla changes --diffs)'

Additionally, if you need to pass extra options and arguments to the
final command, you can do something like this:

  tlacheck () {
    ( tla tree-lint; tla changes --diffs "$@" )

i.e. define a function instead of an alias.

reply via email to

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