Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Unexpected behavior with prompt -p {prompt name}
- X-seq: zsh-users 21611
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Unexpected behavior with prompt -p {prompt name}
- Date: Sat, 4 Jun 2016 10:42:36 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=1muJEJEYWlDilOxj+/pjrWWinb7gj7LjAJayHNQIcww=; b=qqlqQjeqvJ/pZisYk66M2PoXW1N7L/wMag2pnt2ASAqKvoks0kqsRcOrJsjxHzNWEM l5lBV17VBmpn2FCbc+0FT3sTvXu/6NZG4KiP8mh+UgK6DR3GgLSntmrbZltdLuEJd0QS qUvd08G1DQiSvnUl3e6ykboU14IxsyiEEgW4c6GXUmWCCzEv1MFwBt9CwU93FYRgrkhq 97cojR0ggpumiHUtsvm6G69DA/HjoT+xuPd0MYeGiF4tUTmhb6GJcBB3Ul2c+ABH5ack K1h6aKQLkT8ZG6vBSO4eNYtlZ47Cz8YrZ/+kuvEgrj9l5TQZ2zGRJvrBEvfiJR4FQZPT 45qA==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hello,
I've started a project to gather themes for Zsh that base on the
original Zshell prompt subsystem:
https://github.com/psprint/zprompts
i have problem with first theme added. I build prompt in following way:
local _lpar="${cl_parens}["
local _rpar="${cl_parens}]"
local _time="$cl_time_line%D{%H:%M}"
local _user="$cl_text%n"
local _at="$cl_at_colon@$cl_text%m"
local _path="$cl_at_colon:$cl_text%30<*<%/"
local _line="$cl_time_line%i"
local _prompt="$cl_prompt# "
PS1="$_time$_lpar$_user$_at$_path$_rpar$_line$_prompt$cl_rst"
And it works fine, displaying:
10:38[sgniazdowski@MacMini:/Users/sgniazdowski]2#
However, prompt -p results in "]" being eaten, right after the path. I
tried adding various things after $_path, and they all get eaten.
Resulting in:
10:40[sgniazdowski@MacMini:*4# command arg1 arg2 ... argn
What is wrong with the line:
local _path="$cl_at_colon:$cl_text%30<*<%/"
? $cl_* are just colors, the two are defined as:
local col_text=${3:-'cyan'}
local col_at_colon=${4:-'yellow'}
local cl_text="%b%F{$col_text}"
local cl_at_colon="%b%F{$col_at_colon}"
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author