zsh-users
 help / color / mirror / code / Atom feed
* Re: howto: no space after completion (this used to work in 3.0.5!!!!)
@ 1999-05-07  6:43 Sven Wischnowsky
  1999-05-07 14:29 ` Larry P. Schrof
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Wischnowsky @ 1999-05-07  6:43 UTC (permalink / raw)
  To: zsh-users


Timothy J Luoma wrote:

> I have a folder /LocalApps
> 
> it has an alias $lapps
> 
> 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

autoparamslash behavior was broken some time ago, but should be fixed
by patch 6077 (a reply from me to one of your messages). This is in
pws-1[67] so either you are using an older version or there is
something going on I don't understand. Maybe the thing Larry mentioned 
(directory must exist and be accessible)? Or lapps not really set?
(Sorry, I'm just guessing.)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

* Re: howto: no space after completion (this used to work in 3.0.5!!!!)
  1999-05-07  6:43 howto: no space after completion (this used to work in 3.0.5!!!!) Sven Wischnowsky
@ 1999-05-07 14:29 ` Larry P. Schrof
  0 siblings, 0 replies; 7+ messages in thread
From: Larry P. Schrof @ 1999-05-07 14:29 UTC (permalink / raw)
  To: zsh-users

On Fri, May 07, 1999 at 08:43:53AM +0200, Sven Wischnowsky wrote:
> something going on I don't understand. Maybe the thing Larry mentioned 
> (directory must exist and be accessible)? Or lapps not really set?
> (Sorry, I'm just guessing.)

Zsh does a check if it exists, but doesn't check ownership or
permissions. Checking permissions would be a completion thing
probably, since some commands which take directories as arguments need
the directories to be accessible, and some don't.


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

* Re: howto: no space after completion (this used to work in 3.0.5!!!!)
  1999-05-09 17:01   ` Michael Barnes
  1999-05-10 21:01     ` Timothy J Luoma
@ 1999-05-10 21:55     ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 1999-05-10 21:55 UTC (permalink / raw)
  To: zsh-users

>>>>> "Michael" == Michael Barnes <mibarnes@vt.edu> writes:
> try cd ~la[tab]

But how about

	% cd sml/$hos[TAB]


-- Stefan


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

* Re: howto: no space after completion (this used to work in 3.0.5!!!!)
  1999-05-09 17:01   ` Michael Barnes
@ 1999-05-10 21:01     ` Timothy J Luoma
  1999-05-10 21:55     ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Timothy J Luoma @ 1999-05-10 21:01 UTC (permalink / raw)
  To: Michael Barnes; +Cc: zsh-users

Replying to message of Sun, 9 May 1999 13:01:57 -0400
	from "Michael Barnes" <mibarnes@vt.edu>
	regarding ``Re: howto: no space after completion (this used to work  
in 3.0.5!!!!)''
	
> > when I do
> >
> > # cd $la[tab]
>
> try cd ~la[tab]
>
> I do it all the time for long directories that I access all the time and
> it makes the prompt path shorter too:

Thanks.  Unfortunately, even if I did want to retrain my fingers (which I  
really don't want to do, and $ is much easier to reach than ~) this still  
doesn't seem to work for me:

# cd ~la[tab]
# cd ~la[cursor here]

TjL



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

* Re: howto: no space after completion (this used to work in 3.0.5!!!!)
  1999-05-06 15:52 ` howto: no space after completion (this used to work in 3.0.5!!!!) Timothy J Luoma
  1999-05-06 17:40   ` Larry P. Schrof
@ 1999-05-09 17:01   ` Michael Barnes
  1999-05-10 21:01     ` Timothy J Luoma
  1999-05-10 21:55     ` Stefan Monnier
  1 sibling, 2 replies; 7+ messages in thread
From: Michael Barnes @ 1999-05-09 17:01 UTC (permalink / raw)
  To: zsh-users


On Thu, May 06, 1999 at 11:52:49AM -0400, Timothy J Luoma wrote:
> Replying to message of Thu, 6 May 1999 17:17:57 +0200 (MET DST)
> 	from Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
> 	regarding ``Re: howto: no space after completion''
> 	
> > Should there be an option for that? (Meaning: why do you want it?)
> 
> OH YES!  (I just emailed Sven off-list to told him my brain was shorting out  
> and I couldn't remember why I had wanted this!)
> 
> I actually misspoke.  That's not what I want exactly.
> 
> Here's a real-life situation where this comes into place (and what I am used  
> to, using 3.0.5)
> 
> 
> I have a folder /LocalApps
> 
> it has an alias $lapps
> 
> when I do
> 
> # cd $la[tab]

try cd ~la[tab]

I do it all the time for long directories that I access all the time and
it makes the prompt path shorter too:

~ echo $x
/usr/X11R6
~ cd ~x/[tab]
bin/      include/  info/     levels/   lib/      man/      share/
sounds/
~ cd ~x/bin
~x/bin 
^^^^^^
   ^prompt
> 
> 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
> 
> 
> (	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
> 


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

* Re: howto: no space after completion (this used to work in 3.0.5!!!!)
  1999-05-06 15:52 ` howto: no space after completion (this used to work in 3.0.5!!!!) Timothy J Luoma
@ 1999-05-06 17:40   ` Larry P. Schrof
  1999-05-09 17:01   ` Michael Barnes
  1 sibling, 0 replies; 7+ messages in thread
From: Larry P. Schrof @ 1999-05-06 17:40 UTC (permalink / raw)
  To: zsh-users

> 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[220]: cd
lyric[221]: DIR="loc"
lyric[222]: cd $DI[TAB]		# yields $DIR/
lyric[222]: cd /		# 'loc' doesn't exist under /
lyric[223]: 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
> 


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

* Re: howto: no space after completion (this used to work in 3.0.5!!!!)
  1999-05-06 15:17 howto: no space after completion Sven Wischnowsky
@ 1999-05-06 15:52 ` Timothy J Luoma
  1999-05-06 17:40   ` Larry P. Schrof
  1999-05-09 17:01   ` Michael Barnes
  0 siblings, 2 replies; 7+ messages in thread
From: Timothy J Luoma @ 1999-05-06 15:52 UTC (permalink / raw)
  To: Sven Wischnowsky; +Cc: zsh-users

Replying to message of Thu, 6 May 1999 17:17:57 +0200 (MET DST)
	from Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
	regarding ``Re: howto: no space after completion''
	
> Should there be an option for that? (Meaning: why do you want it?)

OH YES!  (I just emailed Sven off-list to told him my brain was shorting out  
and I couldn't remember why I had wanted this!)

I actually misspoke.  That's not what I want exactly.

Here's a real-life situation where this comes into place (and what I am used  
to, using 3.0.5)


I have a folder /LocalApps

it has an alias $lapps

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


(	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



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

end of thread, other threads:[~1999-05-10 21:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-07  6:43 howto: no space after completion (this used to work in 3.0.5!!!!) Sven Wischnowsky
1999-05-07 14:29 ` Larry P. Schrof
  -- strict thread matches above, loose matches on Subject: below --
1999-05-06 15:17 howto: no space after completion Sven Wischnowsky
1999-05-06 15:52 ` howto: no space after completion (this used to work in 3.0.5!!!!) Timothy J Luoma
1999-05-06 17:40   ` Larry P. Schrof
1999-05-09 17:01   ` Michael Barnes
1999-05-10 21:01     ` Timothy J Luoma
1999-05-10 21:55     ` Stefan Monnier

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