From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15157 invoked from network); 8 Jun 2000 14:55:57 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Jun 2000 14:55:57 -0000 Received: (qmail 604 invoked by alias); 8 Jun 2000 14:55:23 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3134 Received: (qmail 581 invoked from network); 8 Jun 2000 14:55:18 -0000 Date: Thu, 8 Jun 2000 16:50:52 +0200 From: =?iso-8859-1?Q?Thomas_K=F6hler?= To: zsh-users@sunsite.auc.dk Subject: Re: wish for a colored completion system Message-ID: <20000608165051.B3286@picard.franken.de> Mail-Followup-To: =?iso-8859-1?Q?Thomas_K=F6hler?= , zsh-users@sunsite.auc.dk References: <20000608163130.A2637@linux-ws.kg-hittfeld.local> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NMuMz9nt05w80d4+" Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000608163130.A2637@linux-ws.kg-hittfeld.local>; from kopfermann@trio-hittfeld.de on Thu, Jun 08, 2000 at 04:34:37PM +0200 X-Operating-System: Linux picard.franken.de 2.2.14 X-Editor: VIM - Vi IMproved 5.6 http://www.vim.org/ X-IRC: tirc-1.2; Nick: jeanluc X-URL: http://jeanluc-picard.de/ --NMuMz9nt05w80d4+ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 08, 2000 at 04:34:37PM +0200, Matthias Kopfermann wrote: >=20 > Okay, after having heard the answer that there is the possibility > to have colored completion, has anybody used it to create useful > completions with colors in them to share with us all? > There is not one example but the very easy to handle=20 > ZLS_COLOURS case for completing different kinds of files. > To me it still seems to be quite complex to say the least. Well... I have a bit of stuff for ssh, but not too much else: setopt autolist ZLS_COLOURS=3D"no=3D36;40:fi=3D36;40:di=3D32;40:ln=3D36;40:pi=3D31;40:so=3D= 22;40:bd=3D44;37:cd=3D44;37:ex=3D35;40:mi=3D36;40:lc=3D\e[:rc=3Dm:ec=3D:mi= =3D37;41" export ZLS_COLOURS LS_COLORS=3D$ZLS_COLOURS export LS_COLORS ZLS_COLOURS=3D"$ZLS_COLOURS:(hosts)=3D(#b)(*).(mayn.de)=3D36;40=3D31;40" # = real fun ZLS_COLOURS=3D"$ZLS_COLOURS:(hosts)=3D*=3D33;40" # hostnames in yellow ZLS_COLOURS=3D"$ZLS_COLOURS:(users)=3D*=3D32;40" # users in green export ZLS_COLOURS # no 0 for normal text (i.e. when displaying something # other than a matched file) # fi 0 for regular files # di 32 for directories # ln 36 for symbolic links # pi 31 for named pipes (FIFOs) # so 33 for sockets # bd 44;37 # for block devices # cd 44;37 # for character devices # ex 35 for executable files # mi none # for non-existent file (default is the value defined # for fi) # lc \e[ for the left code (see below) # rc m for the right code # ec none # for the end code autoload -U compinit compinit zstyle ':completion:*' completer '_complete' '_correct' '_approximate' zmodload complist # ( in my .zshrc, there are more hosts ;-) zstyle '*' hosts 'imbus.mayn.de' 'datenbus.mayn.de' 'willkuere.informatik.= uni-wuerzburg.de' 'picard.franken.de' zstyle '*' users thomas tkoehler koehlert jean-luc root captain zstyle ':completion:*' group-name '' > Okay, I try to be not so polite: :) > Should'nt there be an easier way than that approach? Well - at first, it seems not too obvious that there are predefined names for "normal file", "directory", "symbolic link" etc, but none for things like "hostnames", "usernames" etc... CU, Thomas --=20 Thomas K=F6hler Email: jean-luc@picard.franken.de | LCARS - Linux <>< WWW: http://jeanluc-picard.de | for Computers IRC: jeanluc | on All Real PGP public key available from Homepage! | Starships --NMuMz9nt05w80d4+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.1 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE5P7LLTEYXWMJlHuYRAurRAKCeRTThaVhmvY2cImvHnzudoxLsGACeK/m7 InYOHcOsc+d/dgOAAsa0Brw= =4gsi -----END PGP SIGNATURE----- --NMuMz9nt05w80d4+--