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

TAB-expansion problems



From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
Subject: Re: Ex-bash script for optimisation
Date: Fri, 11 Mar 2005 05:14:17 +0000

Hi,


> On Mar 10,  7:42pm, Meino Christian Cramer wrote:
> } Subject: Re: Ex-bash script for optimisation
> 
> Please start a new message with a new subject if you're asking a new
> question, rather than replying to an unrelated discussion re-using a
> misleading subject.  Thank you.

  Oh, damn! Sorry...my fault...
 
> }  I want to limit the expand function (that one called when pressing
> }  TAB after entering for example "cd")
> 
> It's important to know whether you really mean "expansion" or whether
> (as I suspect) you're asking about "completion".

  As a zsh-newbie I better describe what happens and what I want to
  switch off.

  Suppose I am at my $HOME/tmp/. directory. Furthermore there is only
  ONE additional directory called "TheLonelyOne" there. And I want to
  to change into that directory. As a lazy person now I would type on
  the commandline 

	  cd <TAB>

  and want to get 

      cd TheLonelyOne

  then instead all worldwide reachable directories as a suggestion.

  From my current point of knowledge I didn't neither know the correct
  naming for that behaviour (otherwise I may have already found the
  solution in the docs...) nor whether there are similiar conditions
  with possible other commands, which lead to such "I suggest you now
  everything worldwide possible"-behaviour of zsh (this by far no
  complainment against zsh or any critism !!! :) 

  Or with lesser words: If I would have a name of my problem I may not
  have that problem anymore... ;)

  My compinit-related stuff (as far as I am able to identfy it...) is:
  (from $HOME/.zshrc)


    # Search path for the cd command
    cdpath=(.. ~ ~/src ~/zsh)
    
    setopt   notify globdots nocorrect pushdtohome cdablevars autolist
    setopt   autocd recexact longlistjobs
    setopt   autoresume histignoredups pushdsilent noclobber
    setopt   autopushd pushdminus extendedglob rcquotes mailwarning
    unsetopt bgnice autoparamslash
    setopt   nobeep multios monitor
    
    ### completion stuff
    zstyle ':completion:*' verbose yes
    zstyle ':completion:*:descriptions' format '%B%d%b'
    zstyle ':completion:*:messages' format '%d'
    zstyle ':completion:*:warnings' format 'No matches for: %d'
    zstyle ':completion:*' group-name ''
    
    # ----------------------------------------------------------------------
    xhost local:root 2>&1 > /dev/null
    # The following lines were added by compinstall
    
    zstyle :compinstall filename '/home/mccramer/.zshrc'
    
    autoload -Uz compinit
    compinit
    # End of lines added by compinstall
 

  
  
  


> "Expansion" means you have something like a glob pattern, for example
> a*e, and you want the shell to replace it with file names that match
> the pattern, for example ankle apple argue.  In general, expansion is
> not context-sensitive.
> 
> "Completion" means you've typed part of a word -- usually a prefix --
> and you want the shell to supply the rest of the word in a way that
> fits the context where the word appears.  For example, directory names
> in the arguments of cd.
> 
> }  to file of the current working directory or in other words I want to
> }  switch off the global search for expansion possibilities...
> 
> This question is a bit mystifying because there normally is no "global
> search."  One possibility is that you need to "unset cdpath", but it
> would help if you explained more about (1) whether you use "compinit"
> to set up completion or are using the built-in defaults, and (2) what
> happens when you press TAB that makes you think a "global" search is
> being done.
> 



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