Sponsored Content
Top Forums UNIX for Advanced & Expert Users "╭─ " Character combo in $PATH causes strange autocompletion behavior in zsh Post 302553090 by marshaul on Tuesday 6th of September 2011 06:07:12 PM
Old 09-06-2011
"╭─ " 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,

Code:
cd ~/<TAB>

I would get something like:

Code:
cd ~cd ~/.FontForge/

Where FontForge is the first item in my list, and the first "cd ~/" is duplicated (but it doesn't affect the command and it can't be deleted either).

Incidentally, I have noticed the problem goes away when using a TERM other than xterm-color.

However, I have determined what is causing the issue with xterm-color. Specifically, my prompt is set up as follows:

Code:
local smiley="%(?,%{$fg[green]%}:%)%{$reset_color%},%{$fg[red]%}:(%{$reset_color%})"

PS1="╭─[$PR_LIGHT_MAGENTA%n$PR_NO_COLOR@$PR_GREEN%U%m%u$PR_NO_COLOR:$PR_RED%2c$PR_NO_COLOR]
╰─[ ${smiley} ] %(!.#.$) "

RPS1="$PR_LIGHT_YELLOW(%D{%m-%d %H:%M})$PR_NO_COLOR"

I chipped away at that, eventually character by character, until I discovered that the "╭─" and "╰─" character combos are to blame (any of those characters seems to be sufficient to cause the issue). Removing those 4 characters resolves the issue.

The thing is, I like those characters in my prompt.

So, does anybody have any idea what's going on here?

Incidentally, I am running Mac OS X (Lion, although this problem goes back at least to snow leopard) and zsh 4.2.7.

Last edited by marshaul; 09-06-2011 at 07:15 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[Perl] Strange ne "NO" behavior.

Hi there, I have a strange problem and I cannot figure it out what I am doing wrong here. Let me try to picture it. In principle it is prety straight forward, but something odd is happening. Here is part of the input file snmp_alm.cfg: ... (2 Replies)
Discussion started by: ejdv
2 Replies

2. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

3. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

4. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

5. UNIX for Advanced & Expert Users

Strange tab-completion behavior with zsh in screen

I'm running Mac OS, using the latest version of zsh. I've noticed that I have funny tab-completion behavior when inside a screen session. Specifically, once I press tab, the first part of my command seems to be duplicated before the completion results are inserted. For example, if I type... (14 Replies)
Discussion started by: marshaul
14 Replies

6. Shell Programming and Scripting

"find . -printf" without prepended "." path? Getting path to current working directory?

If I enter (simplified): find . -printf "%p\n" then all files in the output are prepended by a "." like ./local/share/test23.log How can achieve that a.) the leading "./" is omitted and/or b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Discussion started by: pstein
1 Replies

7. Shell Programming and Scripting

Using sed to find text between a "string " and character ","

Hello everyone Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies

8. Programming

Strange "getsockopt" Solaris behavior

Please take a look on following code: s = socket(PF_INET, SOCK_STREAM, 0); //socket fcntl(s, F_SETFL, O_NONBLOCK); //set socket to nonblock retry_conn: ret = connect(s, (struct sockaddr *)&serv_addr, sizeof(struct sockaddr_in)); // try to connect, for sure... (7 Replies)
Discussion started by: revolta25
7 Replies

9. Shell Programming and Scripting

find . -path "*_nobackup*" -prune -iname "*.PDF" \( ! -name "*_nobackup.*" \)

These three finds worked as expected: $ find . -iname "*.PDF" $ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \) $ find . -path "*_nobackup*" -prune -iname "*.PDF" They all returned the match: ./folder/file.pdf :b: This find returned no matches: $ find . -path "*_nobackup*" -prune... (3 Replies)
Discussion started by: wolfv
3 Replies

10. Shell Programming and Scripting

Why awk print is strange when I set FS = " " instead of FS = "\t"?

Look at the following data file(cou.data) which has four fields separated by tab. Four fields are country name, land area, population, continent where it belongs. As for country name or continent name which has two words, two words are separated by space. (Data are not accurately... (1 Reply)
Discussion started by: chihuyu
1 Replies
Gtk2::Combo(3)						User Contributed Perl Documentation					    Gtk2::Combo(3)

NAME
Gtk2::Combo HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Container +----Gtk2::Box +----Gtk2::HBox +----Gtk2::Combo INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable Gtk2::Orientable DEPRECATION WARNING
Gtk2::Combo has been marked as deprecated, and should not be used in newly written code. You should use Gtk2::ComboBox instead of Gtk2::Combo. METHODS
widget = Gtk2::Combo->new $combo->set_case_sensitive ($val) o $val (boolean) $combo->disable_activate widget = $combo->entry $combo->set_item_string ($item, $item_value) o $item (Gtk2::Item) o $item_value (string) widget = $combo->list $combo->set_popdown_strings (...) o ... (list) of strings $combo->set_use_arrows_always ($val) o $val (boolean) $combo->set_use_arrows ($val) o $val (boolean) $combo->set_value_in_list ($val, $ok_if_empty) o $val (boolean) o $ok_if_empty (boolean) PROPERTIES
'allow-empty' (boolean : readable / writable / private) Whether an empty value may be entered in this field 'case-sensitive' (boolean : readable / writable / private) Whether list item matching is case sensitive 'enable-arrow-keys' (boolean : readable / writable / private) Whether the arrow keys move through the list of items 'enable-arrows-always' (boolean : readable / writable / private) Obsolete property, ignored 'value-in-list' (boolean : readable / writable / private) Whether entered values must already be present in the list SEE ALSO
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Box, Gtk2::HBox COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.12.1 2010-07-05 Gtk2::Combo(3)
All times are GMT -4. The time now is 01:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy