zsh-users
 help / color / mirror / code / Atom feed
From: "Thomas Köhler" <jean-luc@picard.franken.de>
To: zsh-users@sunsite.auc.dk
Subject: Re: wish for a colored completion system
Date: Thu, 8 Jun 2000 16:50:52 +0200	[thread overview]
Message-ID: <20000608165051.B3286@picard.franken.de> (raw)
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

[-- Attachment #1: Type: text/plain, Size: 2625 bytes --]

On Thu, Jun 08, 2000 at 04:34:37PM +0200,
Matthias Kopfermann <kopfermann@trio-hittfeld.de> wrote:
> 
> 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 
> 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="no=36;40:fi=36;40:di=32;40:ln=36;40:pi=31;40:so=22;40:bd=44;37:cd=44;37:ex=35;40:mi=36;40:lc=\e[:rc=m:ec=:mi=37;41"
export ZLS_COLOURS
LS_COLORS=$ZLS_COLOURS
export LS_COLORS
ZLS_COLOURS="$ZLS_COLOURS:(hosts)=(#b)(*).(mayn.de)=36;40=31;40" # real fun
ZLS_COLOURS="$ZLS_COLOURS:(hosts)=*=33;40" # hostnames in yellow
ZLS_COLOURS="$ZLS_COLOURS:(users)=*=32;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

-- 
 Thomas Köhler 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

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  parent reply	other threads:[~2000-06-08 14:55 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <no.id>
2000-06-08 14:31 ` Matthias Kopfermann
2000-06-08 14:49   ` Sven Wischnowsky
2000-06-08 14:50   ` Thomas Köhler [this message]
2000-06-08 15:11     ` Matthias Kopfermann
2000-06-08 15:32       ` have to get used to the new zstyle thingy! Matthias Kopfermann
     [not found]         ` <0FVU005MNF7Q6N@la-la.cambridgesiliconradio.com>
2000-06-08 17:37           ` wish for a colored completion system Bart Schaefer
2000-06-08 18:44             ` Fletch
     [not found]               ` <000608122524.ZM16857@candle.brasslantern.com>
     [not found]                 ` <m2bt1c0xoe.fsf@godzilla.phydeaux.org>
2000-06-08 20:07                   ` Bart Schaefer
2000-06-08 20:18                     ` Fletch
2000-06-08 20:36                       ` Peter Stephenson
2000-06-09 13:36 ` Matthias Kopfermann
2000-06-14 13:43 ` Fun zsh trick for today Matthias Kopfermann
2000-06-14 13:57   ` Clint Adams
2000-06-14 14:09     ` Ollivier Robert
2000-06-14 15:02       ` Fletch
2000-06-14 14:15     ` Peter Stephenson
2000-06-14 14:21       ` Peter Stephenson
2000-06-14 14:27       ` Clint Adams
2000-06-14 14:37       ` Bart Schaefer
2000-06-14 15:33 ` Matthias Kopfermann
2000-06-14 15:52   ` Peter Stephenson
2000-06-14 16:31 ` Matthias Kopfermann
2000-06-26 10:23 ` (forw) --help able programs and completion Matthias Kopfermann
2000-06-26 10:30 ` Matthias Kopfermann
2000-06-29 11:41 ` is the reference card for zsh still 3.0 ? Matthias Kopfermann
2000-07-05 10:47 ` Matthias Kopfermann: Re: coloring of --help completion possible? Matthias Kopfermann
2000-07-17 13:39 ` wanted: viins-mode and digit argument with a,i,A and such Matthias Kopfermann
2000-07-17 14:06   ` Peter Stephenson
2000-07-21 10:42 ` completion for GNU color ls, anyone? Matthias Kopfermann
2000-07-21 15:17   ` Adam Spiers
2000-07-21 10:58 ` Matthias Kopfermann
2000-07-21 15:54   ` Bart Schaefer
2000-07-21 16:00 ` Matthias Kopfermann
2000-07-26 16:24 ` how can one let completion work *inside* zsh scripts? Matthias Kopfermann
2000-07-27 12:42 ` Matthias Kopfermann
2000-08-01 15:34 ` Matthias Kopfermann
2000-06-09  7:24 wish for a colored completion system Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
2000-06-08 10:41 Sven Wischnowsky
2000-06-07 15:20 Matthias Kopfermann
2000-06-07 16:09 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000608165051.B3286@picard.franken.de \
    --to=jean-luc@picard.franken.de \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).