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

Re: Few newbie questions..



On Aug 17,  3:55am, Jukka Lehti wrote:
}
} How I can make zsh3 add slash when doing:
} cd ..[TAB]? bash does this automatically and IMHO
} it's really useful.

Completion is supposed to save you keystrokes.  (Funny, it seems to be
causing me a whole lot of extra keystrokes right now.)  Tab and slash
are each one keystroke.  Hence not really useful.

However:

	compctl -g '*(/)' + -x 'S[..]' -k '(..)' -qS/ -- cd
 
} Is there a way to use own function in ~/.zshrc for man
} completion instead of zsh4 builtin? Setting fpath=~/
} or ~/.zshrc doesn't help.

I should think not.  ~/.zshrc isn't a directory or a zcompiled file, so
putting it in fpath is meaningless.  Also, fpath is an array, so setting
it with fpath=~/ is wrong; you probably mean fpath=(~ $fpath) [you don't
need the slash after the tilde].  And you only need to change fpath if
the definition of your function is in its own file and is autoloaded
(that is, you've got a command like `autoload nameofyourfunction' in your
init files somewhere).  If the function is defined in .zshrc, an fpath
search is not needed to find it.

You also haven't said whether you're using "new" completion (`compinit'
in your .zshrc somewhere), or 3.0-style compctl.  The two do mix, but
new completion will always be tried first if it is enabled.  Or you might
want to define a "completion widget," which is another thing entirely.
So it'd be better if you told us what you want zsh to do when you type
a tab after the man command, and let us tell you how to get there; or at
least give us a few more details of what you're trying to do.

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



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