Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: how to use tags in zsh completion system



> On 26 August 2020 at 12:28 Ahmad Ismail <ismail783@xxxxxxxxx> wrote:
> 
> Hi Peter Stephenson,
> 
> This is the first time I am using a mailing list. So, I am not sure whether
> I am doing it correctly or not.
> 
> Do I need to always refer to my previous mail or will you be able to figure
> out my previous mails?

Usually people quote the most relevant sections, but people won't
expect to be able to reconstruct the entire thread from a single email

> Do I need to view my email and its correspondence from
> https://www.zsh.org/mla/ or everything will be in the inbox?

If you're not on the list, people should copy you so you will see
everything (it's useful to mention if you're not on the list).

If you are on the list, you'll get everything anyway.

> Being said that, I tried:
>
> % scp hosts

You're missing the point here.  A tag is entirely an idea within the
completion system itself.  Most commands you can just type <TAB>
and it will complete for you.  Only very occasionally do you
need to configure it do something else.  When you do,
then you put commands involving tags in your intialisation file.
You never need to type them on the command line.

So at this point, the completion system already knows various things
are possible --- a host name, a file, a username --- depending how
you're going to build the command line.  The tags are just logical
names for these things.  (The completion system does a bit
of guesswork about where to find things that are specific to
the scp command, so occasionally it needs a bit of help there.)

If you're just starting from scratch with the completion system, i
suggest you just ignore tags for now.  The system is designed so
most of the time it should "just work".

If you find a case where you actually need to tell it to be cleverer,
that's the time to start thinking about tags.  That would be a
case where multiple completions are possible, but you decide you
need to complete only one type of thing.  That's a rather
advanced use.

Until then, I should just try using the system "out of the box"
and see how that works for you.

Cheers
pws




Messages sorted by: Reverse Date, Date, Thread, Author