zsh-users
 help / color / mirror / code / Atom feed
* various buggy behaviors in zsh out-of-the-box on Suse
       [not found] <1181087811.1134.ezmlm@sunsite.dk>
@ 2007-06-06  0:13 ` Mats Ahlgren
  2007-06-06  2:09   ` Matt Wozniski
  2007-06-06  9:01   ` Peter Stephenson
  0 siblings, 2 replies; 6+ messages in thread
From: Mats Ahlgren @ 2007-06-06  0:13 UTC (permalink / raw)
  To: zsh-users

Hello,

I recently installed zsh and have noticed some very odd behavior -- could anyone please help?

=================================
1) Bugged auto-tabbing behavior

Suppose there is a folder ~/indirection
If I type "cd indirection/[tab]", then this is what happens:

% cd indirecticd indirection/
importantSystemFiles/  wallpaper/             wine-programs@
[other contents of "indirection" folder]

As you can see, autocompletion indents the line 22 characters to the right. Here's another example after hitting *tab*:

% cd media/   cd media/
graphics/   movies/     music/      photos/     wallpaper/

This was the default behavior.

=================================
2) Bugged offset behavior with commands which overflow into new lines

Also, when a line overflows the terminal, it's almost impossible to edit a line by using the arrow keys, because when you insert characters, they get shifted.
For example, after I shrink my terminal window, here's my attempt to do "ls documents/media/wallpaper" [command completes successfully], and then hitting [up arrow] to get the thing I just typed, and then editing it to change the directory "wallpaper" to "graphics":

% ls documents/media/graphicsi
a/wallpaper
ls: cannot access docugraphicsi
a/wallpaper: No such file 
or directory

=================================
3) Annoying autocomplete behavior: 

If I have the following things in a directory:
test/
test.tgz

And I type "te[tab]" to autocomplete, it autocompletes to test/ without ever giving me the option to complete as test.tgz. Is there a way to achieve this like in bash?

Thanks,
Mats


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

* Re: various buggy behaviors in zsh out-of-the-box on Suse
  2007-06-06  0:13 ` various buggy behaviors in zsh out-of-the-box on Suse Mats Ahlgren
@ 2007-06-06  2:09   ` Matt Wozniski
  2007-06-06  9:01   ` Peter Stephenson
  1 sibling, 0 replies; 6+ messages in thread
From: Matt Wozniski @ 2007-06-06  2:09 UTC (permalink / raw)
  To: zsh-users; +Cc: ahlgren

On 6/5/07, Mats Ahlgren <mats_a@mit.edu> wrote:
> Hello,
>
> I recently installed zsh and have noticed some very odd behavior -- could anyone please help?

Is this out-of-the-box from a './configure && make && make install' or
out-of-the-box from a distro-supplied package?  (I know nothing about
Suse, but I presume it has some sort of package management?)

Is behavior any different when launching zsh as "zsh -f"?  This tells
zsh to ignore RC files (my best guess off the top of my head is that
the distro-supplied RC files are broken).

~Matt


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

* Re: various buggy behaviors in zsh out-of-the-box on Suse
  2007-06-06  0:13 ` various buggy behaviors in zsh out-of-the-box on Suse Mats Ahlgren
  2007-06-06  2:09   ` Matt Wozniski
@ 2007-06-06  9:01   ` Peter Stephenson
  2007-06-06 10:30     ` Mats Ahlgren
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2007-06-06  9:01 UTC (permalink / raw)
  To: zsh-users

Mats Ahlgren wrote:
> Hello,
> 
> I recently installed zsh and have noticed some very odd behavior -- could any
> one please help?
> 
> =================================
> 1) Bugged auto-tabbing behavior
> 
> As you can see, autocompletion indents the line 22 characters to the
> right.

This looks like either a bad terminal definition, or the shell is badly
linked to the curses library or its equivalent, or there are funny
characters in the prompt which is confusing the shell (the prompt you
show looks pretty simple but if it's something more complicated
try PS1="%# ").

> 3) Annoying autocomplete behavior: 
> 
> If I have the following things in a directory:
> test/
> test.tgz
> 
> And I type "te[tab]" to autocomplete, it autocompletes to test/ without ever 
> giving me the option to complete as test.tgz. Is there a way to achieve this 
> like in bash?

This isn't the default behaviour, so something is setting an option to
turn it on.  You may find hitting <TAB> again cycles to the other file.
Look at the options in the "Completion" section of the zshoptions manual
for hints.  MENU_COMPLETE or REC_EXACT are possibilities, depending
exactly what it's doing.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


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

* Re: various buggy behaviors in zsh out-of-the-box on Suse
  2007-06-06  9:01   ` Peter Stephenson
@ 2007-06-06 10:30     ` Mats Ahlgren
  2007-06-06 10:40       ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: Mats Ahlgren @ 2007-06-06 10:30 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

Hello, thanks for replying; you've helped solve almost all my problems.

Apparently I *did* make a few modifications and forgot about them... I feel ridiculous about my previous default behavior comment, sorry.
Still have one questions if you'd be so kind:

On Wednesday 06 June 2007 05:01:20 Peter Stephenson wrote:
> Mats Ahlgren wrote:
> > Hello,
> > 
> > I recently installed zsh and have noticed some very odd behavior -- could any
> > one please help?
> > 
> > =================================
> > 1) Bugged auto-tabbing behavior
> > 
> > As you can see, autocompletion indents the line 22 characters to the
> > right.
> 
> This looks like either a bad terminal definition, or the shell is badly
> linked to the curses library or its equivalent, or there are funny
> characters in the prompt which is confusing the shell (the prompt you
> show looks pretty simple but if it's something more complicated
> try PS1="%# ").

# excerpt from .zshrc

# COLORIZE PROMPT
autoload colors; colors

# Prompt
PS1="
$bg[black]$fg[blue]%B%#%b $fg[white]%B"


 Apparently using the variables $bg[...] and $fg[...], etc., seems to be causing this bug. Might you or anyone have any insight as to why?

> > 3) Annoying autocomplete behavior: 
> > 
> > If I have the following things in a directory:
> > test/
> > test.tgz
> > 
> > And I type "te[tab]" to autocomplete, it autocompletes to test/ without ever 
> > giving me the option to complete as test.tgz. Is there a way to achieve this 
> > like in bash?
> 
> This isn't the default behaviour, so something is setting an option to
> turn it on.  You may find hitting <TAB> again cycles to the other file.
> Look at the options in the "Completion" section of the zshoptions manual
> for hints.  MENU_COMPLETE or REC_EXACT are possibilities, depending
> exactly what it's doing.
> 

Apparently I was looking for "auto_menu" -- problem solved.

Many thanks,
Mats


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

* Re: various buggy behaviors in zsh out-of-the-box on Suse
  2007-06-06 10:30     ` Mats Ahlgren
@ 2007-06-06 10:40       ` Peter Stephenson
  2007-06-06 10:45         ` Mats Ahlgren
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2007-06-06 10:40 UTC (permalink / raw)
  To: zsh-users

Mats Ahlgren wrote:
> # Prompt
> PS1="
> $bg[black]$fg[blue]%B%#%b $fg[white]%B"
>
>  Apparently using the variables $bg[...] and $fg[...], etc., seems to
>  be causing this bug. Might you or anyone have any insight as to why?

You need to tell the shell that the characters in those variables
don't move the cursor:  it has no knowledge of terminal escapes so
assumes every character moves the cursor one character to the right.
Try:

PS1="
%{$bg[black]$fg[blue]%}%B%#%b %{$fg[white]%}%B"

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview


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

* Re: various buggy behaviors in zsh out-of-the-box on Suse
  2007-06-06 10:40       ` Peter Stephenson
@ 2007-06-06 10:45         ` Mats Ahlgren
  0 siblings, 0 replies; 6+ messages in thread
From: Mats Ahlgren @ 2007-06-06 10:45 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

Thanks very much; works like a charm!

On Wednesday 06 June 2007 06:40:00 Peter Stephenson wrote:
> Mats Ahlgren wrote:
> > # Prompt
> > PS1="
> > $bg[black]$fg[blue]%B%#%b $fg[white]%B"
> >
> >  Apparently using the variables $bg[...] and $fg[...], etc., seems to
> >  be causing this bug. Might you or anyone have any insight as to why?
> 
> You need to tell the shell that the characters in those variables
> don't move the cursor:  it has no knowledge of terminal escapes so
> assumes every character moves the cursor one character to the right.
> Try:
> 
> PS1="
> %{$bg[black]$fg[blue]%}%B%#%b %{$fg[white]%}%B"
> 



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

end of thread, other threads:[~2007-06-06 10:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1181087811.1134.ezmlm@sunsite.dk>
2007-06-06  0:13 ` various buggy behaviors in zsh out-of-the-box on Suse Mats Ahlgren
2007-06-06  2:09   ` Matt Wozniski
2007-06-06  9:01   ` Peter Stephenson
2007-06-06 10:30     ` Mats Ahlgren
2007-06-06 10:40       ` Peter Stephenson
2007-06-06 10:45         ` Mats Ahlgren

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