From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18262 invoked by alias); 16 Jan 2017 17:23:01 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40371 Received: (qmail 29217 invoked from network); 16 Jan 2017 17:23:01 -0000 X-Qmail-Scanner-Diagnostics: from mail.cs.uni-magdeburg.de by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(141.44.21.48):SA:0(-3.2/5.0):. Processed in 2.235422 secs); 16 Jan 2017 17:23:01 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: elkner@cs.uni-magdeburg.de X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at cs.uni-magdeburg.de does not designate permitted sender hosts) Date: Mon, 16 Jan 2017 18:22:50 +0100 From: Jens Elkner To: zsh-workers@zsh.org Subject: 5.3.1 - lot of bad math expression Message-ID: <20170116172250.GA17611@trex.cs.ovgu.de> Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Milter: milter4j - Mail Filter for Java 1.1.4 (b767) X-Milter: ClamAV 0.98.1-jel on mail - Status: Clean X-RcptTo: zsh-workers@zsh.org --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=".zshenv" # 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 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=".zshrc" # 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 --SLDf9lqlvOQaIe6s--