zsh-workers
 help / color / mirror / code / Atom feed
* Re: Command completion in nslookup
@ 2000-05-05 14:35 Sven Wischnowsky
  2000-05-05 14:50 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Sven Wischnowsky @ 2000-05-05 14:35 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> If I press TAB on empty line, nothing happens. Yes, I remember, it was
> done on purpose for normal command line completion (to avoid listing all
> system commands), but nslookup just have a couple of dozens commands -
> and I do not remember all of them :-) So, is it possible to turn on
> completion in this case?

Unfortunately, this is decided very early in complete-word and the
like, before the completion code is called at all.

I never liked it myself... hm, since we can controll such things in
the completion system (even now, with the styles we have, namely
tag-order): should we change it so that we get this insert-tab-in-
column-one only when the completion code is *not* about to call a
completion widget? I.e., leave it as it was for compctl but allow
completion widgets to decide what they want to do.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Command completion in nslookup
  2000-05-05 14:35 Command completion in nslookup Sven Wischnowsky
@ 2000-05-05 14:50 ` Bart Schaefer
  2000-05-05 14:53   ` Andrej Borsenkow
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2000-05-05 14:50 UTC (permalink / raw)
  To: zsh-workers

On May 5,  4:35pm, Sven Wischnowsky wrote:
} Subject: Re: Command completion in nslookup
}
} Andrej Borsenkow wrote:
} 
} > If I press TAB on empty line, nothing happens. Yes, I remember, it was
} > done on purpose for normal command line completion
} 
} [...] should we change it so that we get this insert-tab-in-
} column-one only when the completion code is *not* about to call a
} completion widget?

You can get this effect already:

really-do-complete-word-even-in-column-one() { zle complete-word "$@" }
bindkey '\t' really-do-complete-word-even-in-column-one

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Command completion in nslookup
  2000-05-05 14:50 ` Bart Schaefer
@ 2000-05-05 14:53   ` Andrej Borsenkow
  2000-05-05 15:24     ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Andrej Borsenkow @ 2000-05-05 14:53 UTC (permalink / raw)
  To: Bart Schaefer, zsh-workers

>
> On May 5,  4:35pm, Sven Wischnowsky wrote:
> } Subject: Re: Command completion in nslookup
> }
> } Andrej Borsenkow wrote:
> }
> } > If I press TAB on empty line, nothing happens. Yes, I
> remember, it was
> } > done on purpose for normal command line completion
> }
> } [...] should we change it so that we get this insert-tab-in-
> } column-one only when the completion code is *not* about to call a
> } completion widget?
>
> You can get this effect already:
>
> really-do-complete-word-even-in-column-one() { zle
> complete-word "$@" }
> bindkey '\t' really-do-complete-word-even-in-column-one
>


But how do I get it for nslookup only (or for any nslookup-like case)?
I'd prefer some context-based solution ... Sven's suggestion looks good
with some shell-level support.

-andrej


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Command completion in nslookup
  2000-05-05 14:53   ` Andrej Borsenkow
@ 2000-05-05 15:24     ` Bart Schaefer
  0 siblings, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 2000-05-05 15:24 UTC (permalink / raw)
  To: zsh-workers

On May 5,  6:53pm, Andrej Borsenkow wrote:
} Subject: RE: Command completion in nslookup
}
} > } [...] should we change it so that we get this insert-tab-in-
} > } column-one only when the completion code is *not* about to call a
} > } completion widget?
} >
} > You can get this effect already:
} >
} > really-do-complete-word-even-in-column-one() { zle complete-word "$@" }
} > bindkey '\t' really-do-complete-word-even-in-column-one
} 
} But how do I get it for nslookup only (or for any nslookup-like case)?

By temporarily switching keymaps?

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Command completion in nslookup
@ 2000-05-08 10:40 Sven Wischnowsky
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Wischnowsky @ 2000-05-08 10:40 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> [ Bart wrote: ]
> > really-do-complete-word-even-in-column-one() { zle
> > complete-word "$@" }
> > bindkey '\t' really-do-complete-word-even-in-column-one
> 
> But how do I get it for nslookup only (or for any nslookup-like case)?
> I'd prefer some context-based solution ... Sven's suggestion looks good
> with some shell-level support.

Hm, what I had in mind wouldn't have allowed us to configure it.

Another suggestion: allow compstate[insert] to take the value `tab'
(or something like this). On entry to the widget it has this value
when in the first column. On exit, if it has this value, only a T=tab
will be inserted. But then the widget can decide what it wants to do
and we could easily add a style for this.

Good? Or is this too weird? (Although I find that quite consistent.)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Command completion in nslookup
@ 2000-05-05 14:29 Andrej Borsenkow
  0 siblings, 0 replies; 6+ messages in thread
From: Andrej Borsenkow @ 2000-05-05 14:29 UTC (permalink / raw)
  To: ZSH workers mailing list

If I press TAB on empty line, nothing happens. Yes, I remember, it was
done on purpose for normal command line completion (to avoid listing all
system commands), but nslookup just have a couple of dozens commands -
and I do not remember all of them :-) So, is it possible to turn on
completion in this case?

-andrej

Have a nice DOS!
B >>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-05-08 10:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-05 14:35 Command completion in nslookup Sven Wischnowsky
2000-05-05 14:50 ` Bart Schaefer
2000-05-05 14:53   ` Andrej Borsenkow
2000-05-05 15:24     ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2000-05-08 10:40 Sven Wischnowsky
2000-05-05 14:29 Andrej Borsenkow

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).