zsh-workers
 help / color / mirror / code / Atom feed
From: Jens Elkner <jel+zsh@cs.uni-magdeburg.de>
To: zsh-workers@zsh.org
Subject: 5.3.1 - lot of bad math expression
Date: Mon, 16 Jan 2017 18:22:50 +0100	[thread overview]
Message-ID: <20170116172250.GA17611@trex.cs.ovgu.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

Hi,

when trying to find a solution/propper settings for the
X=./{etc,bin} ; ls $X   problem I decided to give the latest release aka
5.3.1 a try. However, here I get a lot of errors wrt. the default
completion files e.g. for ls\t like:

_arguments:360: bad math expression: operator expected at `descrs'
_main_complete:341: bad math expression: operator expected at
`lastdescr'
_main_complete:380: bad math expression: operator expected at
`comp_color...'

I guess this version is somewhat closer to ksh than the current one we
have on our systems (5.0.7), and therefore unbraced stuff fails. E.g.

while [[ anum -le  $#descrs ]]; do ... ; done

Is it going to get fixed? If not, what is the best way to do and check,
i.e. make sure, that all files can be used w/o getting into trouble?


BTW: Also I wonder, whether

while (( anum < ${#descrs} )) ; do ... ; done

is a little bit faster than the [[ ]] variant.


Thanx,
jel.

PS: 2 Attachments: my current ~/.zsh{env,rc} - there is no /etc/zshenv
    and /etc/zshrc just contains 'autoload -Uz compinit; compinit -i'.
    /etc/zprofile just exports LOGNAME PATH and set the default umask.
-- 
Otto-von-Guericke University     http://www.cs.uni-magdeburg.de/
Department of Computer Science   Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany         Tel: +49 391 67 52768

[-- Attachment #2: .zshenv --]
[-- Type: text/plain, Size: 2855 bytes --]

# file: ~/.zshenv

HISTFILE=~/.zshistory
HISTSIZE=100
SAVEHIST=1000

# settings for Changing Directories
setopt AUTO_CD no_POSIX_CD
# Expansion/Globbing settings (ksh behavior: more intuitive)
setopt no_IGNORE_BRACES no_IGNORE_CLOSE_BRACES no_MAGIC_EQUAL_SUBST CASE_MATCH \
	no_NOMATCH no_REMATCH_PCRE MULTIBYTE UNSET \
	GLOB no_GLOB_ASSIGN no_GLOB_DOTS GLOB_SUBST CASE_GLOB \
	no_EXTENDED_GLOB KSH_GLOB NO_SH_GLOB
# tbd: X=./{etc,bin} ; print "$X" # as assigned ; ls $X # should ls ./etc ./bin

# Initialisation settings
setopt no_GLOBAL_EXPORT
# Input/Output settings
setopt ALIASES CLOBBER CORRECT INTERACTIVE_COMMENTS PATH_SCRIPT RM_STAR_SILENT
# Job Control settings
setopt no_BG_NICE CHECK_JOBS no_HUP NOTIFY POSIX_JOBS
# Scripts and Functions
setopt no_C_BASES no_C_PRECEDENCES DEBUG_BEFORE_CMD FUNCTION_ARGZERO \
	LOCAL_LOOPS no_MULTIOS
# Shell Emulation
setopt KSH_ARRAYS KSH_TYPESET KSH_OPTION_PRINT LOCAL_OPTIONS LOCAL_TRAPS \
	POSIX_IDENTIFIERS POSIX_STRINGS POSIX_TRAPS \
	no_SH_FILE_EXPANSION SH_NULLCMD no_SH_OPTION_LETTERS SH_WORD_SPLIT
# History/Prompt/ZLE settings: see ~/.zshrc

# we do not have crappy /usr/local/share/zsh/site-functions so just use default
if [[ ${ZSH_VERSION} == '5.0.7' ]]; then
	FPATH='/usr/share/zsh/5.0.7/functions/Calendar:/usr/share/zsh/5.0.7/functions/Chpwd:/usr/share/zsh/5.0.7/functions/Exceptions:/usr/share/zsh/5.0.7/functions/MIME:/usr/share/zsh/5.0.7/functions/Misc:/usr/share/zsh/5.0.7/functions/Newuser:/usr/share/zsh/5.0.7/functions/Prompts:/usr/share/zsh/5.0.7/functions/TCP:/usr/share/zsh/5.0.7/functions/VCS_Info:/usr/share/zsh/5.0.7/functions/VCS_Info/Backends:/usr/share/zsh/5.0.7/functions/Zftp:/usr/share/zsh/5.0.7/functions/Zle'
	FCPATH='/usr/share/zsh/5.0.7/functions/Completion:/usr/share/zsh/5.0.7/functions/Completion/Base:/usr/share/zsh/5.0.7/functions/Completion/Solaris:/usr/share/zsh/5.0.7/functions/Completion/Unix:/usr/share/zsh/5.0.7/functions/Completion/X:/usr/share/zsh/5.0.7/functions/Completion/Zsh'
else
	ZPROTO=/export/scratch/${LOGNAME}/build/_root
	FPATH=
	[[ -d ${ZPROTO}/usr/share/zsh/${ZSH_VERSION} ]] && \
		MODULE_PATH=${ZPROTO}/usr/lib/zsh/${ZSH_VERSION} || ZPROTO=
	FCPATH="${ZPROTO}/usr/share/zsh/${ZSH_VERSION}/functions/Completion"
	for X in ${ZPROTO}/usr/share/zsh/${ZSH_VERSION}/functions/* ; do
		if [[ ${X##*/} == 'Completion' ]]; then
			for D in ${X}/* ; do
				[[ ${D##*/} =~ ^(AIX|BSD|Cygwin|Darwin|Debian|Linux|Mandriva|Redhat|openSUSE)$ || ! -d $D ]] && continue
				FCPATH+=":$D"
			done
		else
			[[ -d $X ]] && FPATH+=":$X"
			[[ ${X##*/} == 'VCS_Info' ]] && FPATH+=":$X/Backends"
		fi
	done
	FPATH=${FPATH:1}
fi
FPATH+=":${FCPATH}"

cdpath=( ~ ~/workspace ~/tmp/current/build /export/scratch/${LOGNAME}/build )

# ignore duplicated pathes
typeset -U PATH NLSPATH MANPATH INFOPATH LD_LIBRARY_PATH_32 LD_LIBRARY_PATH_64

# vim: ts=4 sw=4 filetype=zsh

[-- Attachment #3: .zshrc --]
[-- Type: text/plain, Size: 1109 bytes --]

# file: ~/.zshrc

#typeset -fUrz compinit ; compinit -i	# usually already done via /etc/zshrc

LOGCHECK=1
REPORTTIME=60
WATCH=all
LISTMAX=4096

unset zle_bracketed_paste	# avoid damnb '\e[200~' '\e[201~' on copy-paste
setopt no_BEEP COMBINING_CHARS EMACS

# Completion settings
setopt AUTO_LIST AUTO_PARAM_SLASH HASH_LIST_ALL LIST_AMBIGUOUS LIST_BEEP \
	LIST_PACKED LIST_TYPES no_ALWAYS_LAST_PROMPT no_BAD_PATTERN
# tcsh Stil (expand-or-complete + COMPLETE_IN_WORD=on ist unzureichend)
bindkey "^I" expand-or-complete-prefix

# History settings
setopt APPEND_HISTORY BANG_HIST EXTENDED_HISTORY HIST_EXPIRE_DUPS_FIRST \
    HIST_FCNTL_LOCK HIST_BEEP CSH_JUNKIE_HISTORY
# Job control
setopt BG_NICE

# Prompting settings
setopt PROMPT_PERCENT no_PROMPT_SUBST no_PROMPT_BANG
if [[ ${TERM:0:5} =~ ^(xterm|gnome|dtter)$ ]]; then
	if (( UID == 0 )); then
		PROMPT=$'%{\e[1;48;5;196;38;5;232m%}%n.%m %3~ #%{\e[0m%} '
	elif (( UID == 101 )); then
		PROMPT=$'%{\e[1;48;5;51;38;5;232m%}%n.%m %3~ %%%{\e[0m%} '
	else
		PROMPT=$'%{\e[1;48;5;191;38;5;232m%}%n.%m %3~ %%%{\e[0m%} '
	fi
else
	PROMPT=$'%B%n.%m %3~ %#%b '
fi

             reply	other threads:[~2017-01-16 17:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170116172413epcas2p175e693f3a2c0949043f4edaa7c67158f@epcas2p1.samsung.com>
2017-01-16 17:22 ` Jens Elkner [this message]
2017-01-16 17:48   ` Peter Stephenson
2017-01-16 18:38     ` Jens Elkner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170116172250.GA17611@trex.cs.ovgu.de \
    --to=jel+zsh@cs.uni-magdeburg.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).