Zsh Mailing List Archive
Messages sorted by:
Re: howto: no space after completion (this used to work in 3.0.5!!!!)
- X-seq: zsh-users 2321
- From: "Larry P. Schrof" <schrof@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: howto: no space after completion (this used to work in 3.0.5!!!!)
- Date: Thu, 6 May 1999 12:40:16 -0500
- In-reply-to: <199905061552.LAA16600@ocalhost>; from Timothy J Luoma on Thu, May 06, 1999 at 11:52:49AM -0400
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199905061517.RAA10487@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <199905061552.LAA16600@ocalhost>
> I have a folder /LocalApps
> it has an alias $lapps
Normally, I'm not picky on terminology, BUT, I believe you meant to use
'paramter' instead of 'alias'.
> when I do
> # cd $la[tab]
> I get
> # cd $lapps [cursor here]
> but I actually want
> # cd $lapps/[cursor here]
> so I can use tab-completion to get the listing of all the files inside $lapps
All of the relevant options you list below seem to be set appropriately.
Be sure to check, however, that /LocalApps actually exists on the system.
If it does not, zsh will not expand the parameter as a directory.
(IE, with a trailing slash and no space).
Generalizing this observation:
Zsh will only expand a parameter to a directory (trailing slash) if the
directory exists RELATIVE TO THE CURRENT PATH. So, if there is a 'loc'
directory in my home directory, but NOT in /, you get the following:
lyric: cd $DI[TAB] # yields $DIR/
lyric: cd / # 'loc' doesn't exist under /
lyric: cd $DI[TAB] # yields $DIR
As implied above, several options have to be set correctly to do the
expansion in the first place, and have the cursor placed where it is.
But you already have them set up correctly.
Let me know if this helps or not.
PS. Now what would be cool is if someone took the time to write a
completion function that would examine the permissions on directories
and only complete on directories that fell under a specific set of
permissions and ownership. (For example, use a
complete-executable-dirs function to complete cd with)
> ( again that WORKS in 3.0.5 )
> So actually I don't want to remove the space, I want the 3.0.5 behavior to
> be restored.
> Here are my setopts in case it matters
> AUTO_PARAM_SLASH AUTO_RESUME ALWAYS_TO_END APPEND_HISTORY AUTO_CD AUTO_LIST
> AUTO_NAME_DIRS AUTO_PARAM_KEYS AUTO_PUSHD AUTO_REMOVE_SLASH BG_NICE BRACE_CCL
> CDABLE_VARS COMPLETE_IN_WORD CORRECT CSH_JUNKIE_HISTORY EXTENDED_GLOB
> HASH_CMDS HASH_DIRS HASH_LIST_ALL HIST_IGNORE_DUPS HIST_IGNORE_SPACE
> HIST_NO_STORE HIST_VERIFY IGNORE_EOF ALWAYS_LAST_PROMPT LIST_AMBIGUOUS
> LIST_TYPES LONG_LIST_JOBS MAGIC_EQUAL_SUBST MARK_DIRS MENU_COMPLETE
> NO_BAD_PATTERN NO_BEEP NO_CLOBBER NO_FLOW_CONTROL NO_HUP NO_LIST_BEEP NOTIFY
> NUMERIC_GLOB_SORT PRINT_EXIT_VALUE PROMPT_SUBST PUSHD_IGNORE_DUPS
> PUSHD_SILENT PUSHD_TO_HOME RC_EXPAND_PARAM RC_QUOTES
Messages sorted by: