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
openapp(1)						       GNUstep System Manual							openapp(1)

NAME
openapp - launch applications from the command line SYNOPSIS
openapp [--find] [--debug [--gdb= debuger]] [ --library-combo=library-combo ] application [arguments...] DESCRIPTION
The openapp command allows you to launch graphical GNUstep applications from the command line. application is the complete or relative name of the application program with or without the .app extension, like Ink.app. arguments are the arguments passed to the application. openapp first checks whether the application is in the current working directory. If not then searches the GNUstep domains' Applications folders in the following order: User (i.e. ~/GNUstep/Applications), Local, Network, System. First match wins. OPTIONS
--find application will print out the full path of the application executable which would be executed, without actually executing it. It will also list all paths that are attempted. --debug application starts the application in the debugger. By default gdb, but this can be changed with the --gdb= argument or through the GDB shell variable. --library-combo=library-combo Starts the application with the specified library combo. This is a rarely used option in a non-flattened setup. See the library- combo(7) man-page for more information about the different library combinations. --help print above usage description. EXAMPLES
Start Ink.app without additional parameters: openapp Ink.app Launch Ink.app and pass it the --debug argument: openapp --debug Ink.app To determine which executable is launched by openapp, type: openapp --find Ink.app The output of the above command might be something like: /usr/GNUstep/Local/Applications/Ink.app/Ink ENVIRONMENT
GNUSTEP_CONFIG_FILE is used to determine where the GNUstep.sh configuration file is located. If the variable is not set openapp tries to locate it in the folder where openapp was started, then in the user domain, and as a last resort in the system domain (or actually the place you configured (--with-config-file=) during building). GDB Sets the debugger to use when --debug is used. SEE ALSO
debugapp(1), GNUstep(7), gopen(1), library-combo(7), opentool(1) HISTORY
Work on openapp started October 1997. openapp was originally written by Ovidiu Predescu <ovidiu@net-community.com> and is now maintained by Nicola Pero <nicola.pero@meta-innova- tion.com> AUTHORS
This manual page was first written July 2003 by Martin Brecher <martin@mb-itconsulting.com>. Updated with notes from Hubert Chathi <uhoreg@debian.org> and Dennis Leeuw <dleeuw@made-it.com>, December 2007 by Dennis Leeuw. gnustep-make 12/12/2007 openapp(1)
All times are GMT -4. The time now is 06:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy