From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10720 invoked from network); 27 Jul 2001 18:37:41 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Jul 2001 18:37:41 -0000 Received: (qmail 24124 invoked by alias); 27 Jul 2001 18:37:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4059 Received: (qmail 24111 invoked from network); 27 Jul 2001 18:37:19 -0000 Date: Fri, 27 Jul 2001 11:37:16 -0700 From: Will Yardley To: zsh-users@sunsite.dk Subject: Re: comptctl help Message-ID: <20010727113716.A10777@hq.newdream.net> References: <20010726165246.D5669@hq.newdream.net> <200107271342.PAA24170@beta.informatik.hu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200107271342.PAA24170@beta.informatik.hu-berlin.de> User-Agent: Mutt/1.3.19i Organization: New Dream Network On Fri, Jul 27, 2001 at 03:42:22PM +0200, Sven Wischnowsky wrote: > compctl -g '*(D-/)' cd ... that works perfectly... thanks! > you could use (and this should also solve the other problem you have > with this function): > > filenames=( ${pref}*(N-^/) ${pref}*/ ) > > > hostnames=( ${(M@)hosts:#${pref}*} ) > > if [[ ${#filenames} -eq 0 && ${#hostnames} -eq 1 ]]; then > > reply= this works too. _except_ it puts a space after completing the directory name still ie: scp ju completes to scp junk/[space] instead of scp junk/[wait for filename completion still] i suppose that sometimes you might want to copy a whole directory (and it would be really fancy to take a directory arg if you did scp -r but a filename only if you just did scp) don't know if it's possible to do this. > This isn't enough information to enable to help you. No way to get > newer versions running there? ok here's one example: vader% scp williargv=(willi '') am@ it completes it but does this (this is the same .compctl as on the other machine). this also messes up my spacing - if i hit control-u i still have: vader% scp williargv=(willi '') vader% echo $ZSH_VERSION 3.0.7 this isn't really such a big deal since it's only one machine - i may just ignore certain completions based on ZSH_VERSION my personal machines are all 4.0.1, but the majority of the machines i use for work are 3.1.9-dev-6 - the stable debian package. aside from building a package myself or adapting the unstable package and building it on stable not really going to happen (ie there are 110 machines or so and i'm not going to install it from source on all of them :>) an example from one of these machines: yakko% kill -Bad syntax, perhaps a bogus '-'? Bad syntax, perhaps a bogus '-'? ABRT CLD FPE INT POLL QUIT STOP TRAP TTOU USR2 XCPU ALRM CONT HUP KILL PROF SEGV SYS TSTP URG VTALRM XFSZ BUS EXIT ILL PIPE PWR STKFLT TERM TTIN USR1 WINCH this doesn't happen on my 4.0.1 machines but perhaps it's just being picky. (also leaves the line placement a bit messed up even if i clear line) i think i just copied this from the defaults or from someone so it's possible there's an error or is there just something in here that needs to be different between linux / BSD? my personal machines are all freebsd so it's possible that that's the difference. anyway i hardly ever use this completion anyway so it's not a huge deal - just annoying when i try to use it. compctl -j -P '%' + -s '`ps -x | tail +2 | cut -c1-5`' + \ -x 's[-] p[1]' -k "($signals[1,-3])" -- kill thanks for the help! will