Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
5.3.1 - lot of bad math expression
- X-seq: zsh-workers 40371
- From: Jens Elkner <jel+zsh@xxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: 5.3.1 - lot of bad math expression
- Date: Mon, 16 Jan 2017 18:22:50 +0100
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
# 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
# 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author