zsh-users
 help / color / mirror / code / Atom feed
* Completion list question
@ 2001-03-23 14:56 Björn Lindström
  2001-03-23 16:42 ` Alisdair McDiarmid
  0 siblings, 1 reply; 3+ messages in thread
From: Björn Lindström @ 2001-03-23 14:56 UTC (permalink / raw)
  To: zsh-users

How do I make zsh-3.1.9 show the completion possibilities in the
style of 'ls -F'? I want this instead of color on my BSD box to
make it consistent with BSD ls.

-- 
Björn Karl Håkan Lindström
bkhl@klingonska.org       -><-       http://home.swipnet.se/bkhl/
Ramsta Svista SE-755 91 phon:+46(0)18-398168 cel:+46(0)73-6171268


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

* Re: Completion list question
  2001-03-23 14:56 Completion list question Björn Lindström
@ 2001-03-23 16:42 ` Alisdair McDiarmid
  2001-03-24 19:32   ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Alisdair McDiarmid @ 2001-03-23 16:42 UTC (permalink / raw)
  To: zsh-users

On Fri, Mar 23, 2001 at 03:56:48PM +0100, Bj?rn Lindstr?m wrote:
> How do I make zsh-3.1.9 show the completion possibilities in the
> style of 'ls -F'? I want this instead of color on my BSD box to
> make it consistent with BSD ls.

On a similar note, how do I make zsh 3.1.9 show the completion
possiblities in colour? Mine already does display in the style of
`ls -F'.
-- 
Alisdair McDiarmid                    <http://wasters.org/pubkey.asc>


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

* Re: Completion list question
  2001-03-23 16:42 ` Alisdair McDiarmid
@ 2001-03-24 19:32   ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 2001-03-24 19:32 UTC (permalink / raw)
  To: zsh-users

On Mar 23,  3:56pm, Björn Lindström wrote:
} Subject: Completion list question
}
} How do I make zsh-3.1.9 show the completion possibilities in the
} style of 'ls -F'? I want this instead of color on my BSD box to
} make it consistent with BSD ls.

This is still accomplished by `setopt list_types' just like it was with
old completion.  With new completion, though, it'll only work in cases
where zsh "knows" that what it's completing are file names, which depends
on how the completion function called the `compadd' builtin.

(Really, this is true for old completion, too, but there aren't so many
ways using compctl to insert your own set of matching strings into the
list, so it's harder to forget to tell zsh what is a file.)

To turn off colors, make sure that the `list-colors' style is NOT set,
that you are NOT using "menu selection" (the `menu' style with a value
containing `select=...', nor the menu-select widget bound to a key, and
probably several other things besides), and lastly that the zsh/complist
module is NOT loaded.

It's probably a bug (Sven?) that it's not possible to use menu selection
without getting color listings as well.

On Mar 23,  4:42pm, Alisdair McDiarmid wrote:
} Subject: Re: Completion list question
}
} On a similar note, how do I make zsh 3.1.9 show the completion
} possiblities in colour?

To begin with, your terminal type has to be one that supports color.  If
that's not a problem, then the quickest way is

    zmodload -i zsh/complist
    zstyle ':completion:*' list-colors ''

to use zsh's default colors (which are the same as GNU ls's defaults).
If you use the LS_COLORS environment variable to customize GNU ls, then
you probably want

    zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}

which is the example from the manual under the list-colors style.  See
therein for more information.

The caveats above about zsh needing to know what's a file and what is
not also apply to colored listings, but there are zstyles to get zsh to
color matches that aren't known to be files.  See the manual under the
list-colors style and the ZLS_COLORS parameter.

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

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

end of thread, other threads:[~2001-03-24 19:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-23 14:56 Completion list question Björn Lindström
2001-03-23 16:42 ` Alisdair McDiarmid
2001-03-24 19:32   ` Bart Schaefer

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