Strange tab-completion behavior with zsh in screen


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Strange tab-completion behavior with zsh in screen
# 8  
Old 11-20-2010
OK, well I tried running
Code:
export TERM=xterm-color

I also tried xterm and vt100.

I even tried, when testing TERM=vt100 in screen, configuring terminal.app to strictly emulate vt100, by declaring the terminal as vt100 and selected the "strict vt100 keypad behavior" option.

None of this had any affect on the problem. Unless I would have to do something more than simply export TERM=blah within a screen session.
# 9  
Old 11-20-2010
Hi.

I'd guess that it may have to do with your zsh prompt string, or (less cheerfully) the complex completion system of zsh.

What does your prompt string look like? I have not done much with mine, so it looks like:
Code:
leap% ps | grep $$
30801 pts/0    00:00:00 zsh
leap% echo $PROMPT
%m%#

but when I enter cd ~<TAB> it prints the strings to which ~ might expand (in columns) and returns the cursor to after the ~

However, I am not using screen ... cheers, drl
This User Gave Thanks to drl For This Post:
# 10  
Old 11-20-2010
My prompt is fairly complex:

Code:
╭─[mylongusername@Marshalls-MacBook-Pro:~]
╰─[ :( ] $ echo $PROMPT                                                                         (11-20 15:31)
╭─[%{%}%n%{%}@%{%}%U%m%u%{%}:%{%}%2c%{%}]
╰─[ %(?,%{%}:%)%{%},%{%}:(%{%}) ] %(!.#.$)

drl, I believe you have it figured out.

If I start a screen session, and then run export PROMPT=% in order to give myself a blank prompt, the problem is resolved!

So, any ideas what I might do, other than living with it (now that I at least know what's causing it), or using a simple prompt within screen? Is there any way to configure screen, like say, what the prompt variable is?

Last edited by marshaul; 11-20-2010 at 07:42 PM..
# 11  
Old 11-20-2010
Hi.

Use half of the current prompt -- as much as makes sense. If it works, add half of the part left out, if it doesn't work, cut the half in half, repeat until solved.

Or, you could start with an emptyish prompt, and add a bit each time.

Good luck, keep us posted ... cheers, drl
# 12  
Old 11-20-2010
To be honest, I can't figure out how to change the default prompt in screen.

I've been looking at screenrc files via google for a couple hours now, but I haven't found anything.
# 13  
Old 11-23-2010
I just noticed that this problem also occurs when using su.
# 14  
Old 11-23-2010
su has a prompt? I think su just drops you into the target user's default shell.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing literal tab character from zsh to other program

I have a Zsh script which invokes another program. One of the paramters to be passed, should be a literal tab, i.e what in common programming languages is often written as "\t". If it were bash, I think I could use the special form $"\t" but this doesn't seem to work (the called program... (5 Replies)
Discussion started by: rovf
5 Replies

2. UNIX for Dummies Questions & Answers

Bash Tab Completion Hanging

Hi, I'm having a problem with tab completion at the bash command line. For some reason, whenever I type g<tab>, the terminal will freeze up for 5-10 seconds before asking me if I want to display all 325 possibilities. I thought that maybe it's because of the high number of commands, but I have... (4 Replies)
Discussion started by: Raz716
4 Replies

3. UNIX for Advanced & Expert Users

"╭─ " Character combo in $PATH causes strange autocompletion behavior in zsh

I've posted about this before, but only recently narrowed the problem down to a specific cause. Ok, first of all, the behavior: It occurs when autocompletion brings up its list (not when there is only a single option). Basically, if I were to type, say, cd ~/<TAB> I would get something... (2 Replies)
Discussion started by: marshaul
2 Replies

4. Shell Programming and Scripting

zsh and host completion

Hi there is there a way i can add to my .zshrc so that when i type rsh <tab> it takes the name for a list of hosts i know it looks in .ssh/know_hosts but i want it for rsh and for a list that i supply thanks A (4 Replies)
Discussion started by: ab52
4 Replies

5. UNIX Desktop Questions & Answers

TAB completion in cygwin

Hi there, I ve been using cygwin for some time now without any problems. However, recently I ve mapped a new drive on Windows and are now having problems with TAB completion for awk scripts in cygwin on this newly mapped drive (cygdrive t). I can access and run all files but cygwin doesn't do... (5 Replies)
Discussion started by: Tommes
5 Replies

6. Shell Programming and Scripting

hp unix doesn't have tab completion

hi guys, i am new to HP unix , i am doing Solaris , i am just asking is there any thing like "bash" in hp unix including tab completion? (8 Replies)
Discussion started by: dagigg
8 Replies

7. Shell Programming and Scripting

Tab completion in csh

Is it possible to set up my .cshrc so that a single tab attempts to autocomplete, while a double tab gives a list of all possible options. In other words, I want it to work like bash in this regard. Thanks! (3 Replies)
Discussion started by: James McMurray
3 Replies

8. UNIX for Dummies Questions & Answers

Tab completion gubbins

Hello all How do you configure unix terminal to list files as you tab complete. I'm using a unix terminal at work and when i first started tab complete on a folder would list all matches if there were more than one. eg. monkey.xml mon.xml monkeyboy.xml in one folder if i cd into... (2 Replies)
Discussion started by: GNUless
2 Replies

9. UNIX for Dummies Questions & Answers

Tab Completion on Solaris 10

Hi, Is there a way to turn on tab completetion on Solaris 10? (2 Replies)
Discussion started by: annointed3
2 Replies

10. UNIX for Dummies Questions & Answers

tab completion using ! history command

Hi all, I recently discovered the ! command. I think it's great that !cd ? will match the last command that began with cd ?. However, for ! to be particularly useful to me (for now anyway) it would be nice if there was a tab completion option available (as with the cd command). Does anyone know... (3 Replies)
Discussion started by: x-375HK-x
3 Replies
Login or Register to Ask a Question