Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: New zsh user, I have a few questions.



Bart Schaefer wrote:

For the remainder of this message, I'm going to assume that you have 4.0.3
or 4.0.4.  If you don't, a lot of what follows won't make sense.

Ack!  As usual I never provide enough info.. :)  4.0.4.

Secondly, it's helpful to know whether you've load the function-based
completion system with `compinit', or are using the default completions,
or have added your own completions with `compctl' commands.  (Some of
what you say below makes me think you're using `compinit', but I'm not
really sure.)

compinit, yes. I found a set of zsh startup scripts somewhere, can't recall where now, but they set up quite a bit of stuff. I should have done this first, but I've put the scripts I'm using on http://theblackmoor.net/zsh

I've made a few changes since I posted the message (been doing some reading :) had have answered a few of my own questions, but will likely make more changes based on your help :)

Thirdly, a good place to start looking is Peter W. Stephenson's zsh user
guide:	http://zsh.sunsite.dk/Guide/zshguide.html

Bookmarked, reading after this message :)


If you're already using `compinit', the tar completion that is included
does this (and several other useful things) right out of the box -- but
only if you supply the options to the `tar' command before pressing TAB.
E.g., after `tar tzf ' zsh completes *.tar.gz or *.tgz files, but after
`tar xIf ' it completes *.tar.bz2 files, and after `tar --' it completes
tar options; but after just plain `tar ' it completes any file name.

DOH!  Works great, a fine example of my not rtfm'ing.

This almost certainly means that you have the REC_EXACT option set.  Unset
it again (`unsetopt rec_exact' or `setopt no_rec_exact').  (BTW, `setopt'
ignores case and discards underscores; `setopt NOrecexact' is the same.)

Interestingly, just setopt doesn't show this, but when I did unsetopt rec_exact it responded as infered.

Hmm, the default is to not show dotfiles when completing unless you have
explicitly typed the first dot.  Is there some other reason that you've
enabled them?  Perhaps `unsetopt globdots' would be a good idea?

Aha, yes, it was set in the zshrc I started with, it's now removed. And now it works perfectly! I'm going to have to look at all the opts this file is setting up and see exactly what they're doing.. Didn't consider that.


You probably want to tell screen to NOT create login shells when it
creates new windows, and then segregate commands in your ~/.z* files
so that any settings that can be inherited through the environment
(such as setting of $path) are done only in ~/.zlogin or ~/.zprofile.

Aha, I had been trying to poke around and do just this, had just been thinking about it, hadn't looked into screen yet.

You can also try the `zcompile' command or the `zrecompile' function
(see the "User Contributions" chapter in the docs) to increase the speed
of loading your init files.

This I shall, I noticed the delay was about half with no .zshrc (and thus no aliases, prompt script, etc..), I'll check out compiling the scripts.

I hope this was helpful; good luck.

Very, thank you :) I've also been skimming the list and have found a plethora of neat stuff, I'm taking notes and/or adding it to my zshrc, etc, because I never remember anything. :)

Cheers.

--
Walter Francis
http://theblackmoor.net                  Powered by Red Hat Linux 7.2



Messages sorted by: Reverse Date, Date, Thread, Author