zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ismail Donmez <ismail@donmez.ws>, zsh-users@zsh.org
Subject: Re: Giving "ls" an alias causing completion problems
Date: Thu, 22 Aug 2013 07:32:32 -0700	[thread overview]
Message-ID: <130822073232.ZM1502@torch.brasslantern.com> (raw)
In-Reply-To: <CAJ1KOAhB6Crfq2VDL_eNzYpd=4nTKEfYaAXxu2SRRdEqEqXM1A@mail.gmail.com>

On Aug 22,  1:31pm, Ismail Donmez wrote:
} 
} [~]> zsh --version
} zsh 5.0.2 (x86_64-suse-linux-gnu)
} 
} 
} # When ls is not aliased, life is good
} # Pressing tab switches between completions
} 
} [~]> alias ls
} ls=_ls

You say "not aliased" but this sample makes it appear that ls *has*
been aliased, possibly to the completion function for itself.  If it
were not aliased, you should see no output.  What are you actually
trying to demonstrate there?

If the above really is the output from that command, then in your first
sample of tab-completion you are not getting completions for "ls", you
are getting completions for "_ls", which probably means just the file
defaults.

However, if the above really is the output, then you likely have a
deeper problem happening somewhere and I'd distrust anything further
until you figure out how you got that strange alias in the first place.

} # Giving ls an alias pressing tab key shows all results on one line
} 
} [~]> alias ls="ls --color"
} [~]> ls <tab> bin  config  Desktop  Documents  Downloads  hacks
}  public_html  rpmbuild
} <tab> bin  config  Desktop  Documents  Downloads  hacks  public_html
}  rpmbuild

Are the results actually being inserted into the command line where
you can edit them, or by "shows all results" do you mean that the
listing display which normally appears below the command line has
instead been displayed in the wrong place and wrong format?

What do you see if you type <ctrl+x h> instead of <tab>?  Normally it
would be something very similar to this:

torch% alias ls='ls --color'
torch% ls 
tags in context :completion::complete:ls::
    argument-rest options  (_arguments _ls)
tags in context :completion::complete:ls:argument-rest:
    all-files  (_files _arguments _ls)


  reply	other threads:[~2013-08-22 14:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 10:31 İsmail Dönmez
2013-08-22 14:32 ` Bart Schaefer [this message]
2013-08-22 14:54   ` Bart Schaefer
2013-08-23 10:37     ` İsmail Dönmez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=130822073232.ZM1502@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=ismail@donmez.ws \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).