zsh-users
 help / color / mirror / code / Atom feed
* Re: misc compctl
@ 1998-01-29  2:33 Alexius Ludeman
  0 siblings, 0 replies; 2+ messages in thread
From: Alexius Ludeman @ 1998-01-29  2:33 UTC (permalink / raw)
  To: zsh-users

Since we're all mentioning our little tricks.  Here is what i use:

autoload createcomphosts
compctl -K createcomphosts telnet rsh rup ping traceroute ssh xrsh

function createcomphosts()
   {
   if [ $comphost"X" = "X" ]; then
      comphost=(`ypcat netgroup | cut -d, -f 1 | cut -c2-` other hosts
                not in netgroup map )
      reply=( $comphost )
   else
      reply=( $comphost )
   fi
}

Since our netgroup map is quite large (3569 hosts).  This is dynamic
enough and is only created on first completion and doesn't bloat all
the shells.

Although I do get a strange error sometimes which I haven't entirely
looked into, but I'll get an error about "zsh: condition expected:
somerandomhostname".

Another strange behavior is when I use the push-line feature and bind
ctrl-p to it.  Now when I first type a line and hit ctrl-p it'll push
the command I was working on away as designed.  But say I start
scrolling through the history then ctrl-p become previous history.

thank you drive through,
Lex


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

* Re: misc compctl
  1998-01-24 11:37     ` Mirar
@ 1998-01-24 11:57       ` Mirar
  0 siblings, 0 replies; 2+ messages in thread
From: Mirar @ 1998-01-24 11:57 UTC (permalink / raw)
  To: zsh-users

And here is ssh, nslookup, other network stuff and gdb:


hosts=(fixed list of my computers)
or
hosts=($(echo ls $(echo | nslookup | sed -n '1s/^[^.]*\.\(.*\)$/\1/p') | nslookup 2>&1 | sed '1,4d' | awk '{print $1}' | grep -v '\.$' | grep -v '>' | sort))
or something...

compctl -k "($hosts -l -n -a -x -i -t -v -q -f -e -c -p -L -R -C -o)" \
	-x "c[-1,-l]" -u \
	- "c[-1,-i]" -f \
	- "c[-1,-e]" -k "(~ none)" \
	- "c[-1,-c]" -k "(idea des 3des tss arcfour none)" \
	- "c[-1,-p]" -k ports \
	- "c[-1,-L] c[-1,-R] c[-1,-o]" -k "()" \
	-- ssh

compctl -k hosts \
	-x "n[1,-class=]" -k "(any in chaos hesiod)" \
	- "n[1,-query=]" -k "(a cname hinfo md mx mb mg minfo ns ptr soa txt uinfo wks any)" \
	-- + -k "(-query= -all\  -class= -d2\  -nod2\  -debug\  -nodebug\  -defname\  -nodefname\  -domain= -ignoretc\  -noignoretc\ )" -Q -S '' \
	nslookup

compctl -k hosts \
	-x "C[-1,[^-]*] p[2,-1]" -k ports \
	-- + -k "(-8 -E -L -a -d -e -l -n -r)" \
    	telnet

compctl -k "($hosts -s -d -l -L -n -r -R -v -i -I -t)" ping

compctl -x 'N[-1,@]' -k hosts - 's[]' -u -S '' -- finger talk

compctl -g "*(*)" -k "(-help -nx -q -batch -cd -f -b -tty -exec -se -core -symbols -c -x -d)" \
	-x "p[1],C[-2,(-cd|-directory|-core|-c|-se|-exec|-symbols|-command|-x)]" -g "*(*)" -k "(-help -nx -q -batch -cd -f -b -tty -exec -se -core -symbols -c -x -d)" \
	- "C[-1,(-cd|-directory)]" -g '*(-/)' \
	- "C[-1,(-core|-c)]" -g 'core*' \
	- "C[-1,(-se|-exec)]" -g '*(*)' \
	- "C[-1,(-symbols|-command|-x)]" -g '*' \
	- "C[-1,[^-]*]" -g "core*" \
	-- gdb


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

end of thread, other threads:[~1998-01-29  2:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-29  2:33 misc compctl Alexius Ludeman
  -- strict thread matches above, loose matches on Subject: below --
1998-01-20 12:00 tar compctl Niall Smart
1998-01-20 17:51 ` CVS compctl Mirar
1998-01-23 21:22   ` man compctl Thomas Köhler
1998-01-24 11:37     ` Mirar
1998-01-24 11:57       ` misc compctl Mirar

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