zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: compctl -l
Date: Wed, 15 Oct 2003 15:06:02 +0000	[thread overview]
Message-ID: <1031015150603.ZM23724@candle.brasslantern.com> (raw)
In-Reply-To: <20031015093725.GM867@DervishD>

On Oct 15, 11:37am, DervishD wrote:
}
}     Definitely, if you ever come to Spain, I owe you a good dinner ;))

I'll keep that in mind.

} >     compctl -l '' nohup noglob exec nice eval - time rusage
} 
}     Yes, this is another clear use I understood. The '-' doesn't
} confuse compctl?

It might confuse it if it were written in this order:

    compctl -l '' - nohup noglob exec nice eval time rusage

Once compctl begins parsing the list of command names, though, it won't
change back to parsing options, so "-" is just another command name in
the previous excerpt.

} > "compctl -x ... -l ..." is the real meat
} 
} What confused me is the documentation about -l:

That documentation was written by another non-native English speaker,
so perhaps a bit is lost in the double translation.

}     -l CMD
}         This option restricts the range of command line words that
} are considered to be arguments. [...] . Completion is then performed
} as if these had been given as arguments to the CMD supplied with the
} option.
} 
}     IMHO, this option doesn't really restricts what in the command
} line is an argument :???

When CMD is the empty string, it does.  In that case, the arguments are
restricted to words 2 through the end (with the original command name
as word zero), and word 1, which would normally be an argument, is a
command name.

However, you're right that this is badly worded in the case where CMD
is not empty.  It restricts the words considered to be arguments to
exactly the same set as before they were restricted, but changes the
interpretation of the word in command position.

I may be misremembering, but I think originally -l didn't have any
argument and always worked like the usage with an empty argument.  The
doc thus was written for that case and then mutated to cover the other.

} Well, I must admit that my completion knowledge is worse than my
} english, but I don't get the meaning of that... The completion is
} performed in two ways: command-like or using 'CMD' completion :??

It's trying to get across the notion that one word is completed as a
command name (using "compctl -C") and then the rest of the words are
completed as arguments of whatever command the first word names.  It's
describing what happens with different cursor placements at the time
completion is invoked.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2003-10-15 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-14 23:02 DervishD
2003-10-15  5:13 ` Bart Schaefer
2003-10-15  9:37   ` DervishD
2003-10-15 15:06     ` Bart Schaefer [this message]
2003-10-15 17:52       ` DervishD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1031015150603.ZM23724@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).