* zsh 5.0.8-test-2 @ 2015-08-21 20:50 Peter Stephenson 2015-08-22 0:10 ` Matthew Martin 2015-08-28 2:05 ` string to array space problem in filenames Ray Andrews 0 siblings, 2 replies; 29+ messages in thread From: Peter Stephenson @ 2015-08-21 20:50 UTC (permalink / raw) To: Zsh Users A test version for the next release of zsh (which will be 5.1) can be found in: http://www.zsh.org/pub/development/ If you get a chance, please try this out and report any problems. Thanks pws ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: zsh 5.0.8-test-2 2015-08-21 20:50 zsh 5.0.8-test-2 Peter Stephenson @ 2015-08-22 0:10 ` Matthew Martin 2015-08-22 0:30 ` Michael Beasley 2015-08-22 11:48 ` Jun T. 2015-08-28 2:05 ` string to array space problem in filenames Ray Andrews 1 sibling, 2 replies; 29+ messages in thread From: Matthew Martin @ 2015-08-22 0:10 UTC (permalink / raw) To: Peter Stephenson; +Cc: Zsh Users Running on an OpenBSD snapshot, test X02zlevi just hangs without any output Setting ZTST_verbose=1 doesn't give any additional information. Not sure how to further debug. I can post the patch to update the port if that'd help anyone debug. - Matthew Martin On Fri, Aug 21, 2015 at 3:50 PM, Peter Stephenson <p.w.stephenson@ntlworld.com> wrote: > A test version for the next release of zsh (which will be 5.1) can be > found in: > > http://www.zsh.org/pub/development/ > > If you get a chance, please try this out and report any problems. > > Thanks > pws ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: zsh 5.0.8-test-2 2015-08-22 0:10 ` Matthew Martin @ 2015-08-22 0:30 ` Michael Beasley 2015-08-22 0:45 ` Matthew Martin 2015-08-22 11:48 ` Jun T. 1 sibling, 1 reply; 29+ messages in thread From: Michael Beasley @ 2015-08-22 0:30 UTC (permalink / raw) To: Matthew Martin; +Cc: zsh-users [-- Attachment #1: Type: text/plain, Size: 678 bytes --] On Aug 21, 2015 8:11 PM, "Matthew Martin" <phy1729@gmail.com> wrote: > > Running on an OpenBSD snapshot, test X02zlevi just hangs without any > output Setting ZTST_verbose=1 doesn't give any additional information. > Not sure how to further debug. > > I can post the patch to update the port if that'd help anyone debug. > > - Matthew Martin > > > On Fri, Aug 21, 2015 at 3:50 PM, Peter Stephenson > <p.w.stephenson@ntlworld.com> wrote: > > A test version for the next release of zsh (which will be 5.1) can be > > found in: > > > > http://www.zsh.org/pub/development/ > > > > If you get a chance, please try this out and report any problems. > > > > Thanks > > pws Please do. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: zsh 5.0.8-test-2 2015-08-22 0:30 ` Michael Beasley @ 2015-08-22 0:45 ` Matthew Martin 0 siblings, 0 replies; 29+ messages in thread From: Matthew Martin @ 2015-08-22 0:45 UTC (permalink / raw) To: Michael Beasley; +Cc: zsh-users On Fri, Aug 21, 2015 at 08:30:02PM -0400, Michael Beasley wrote: > On Aug 21, 2015 8:11 PM, "Matthew Martin" <phy1729@gmail.com> wrote: > > > > Running on an OpenBSD snapshot, test X02zlevi just hangs without any > > output Setting ZTST_verbose=1 doesn't give any additional information. > > Not sure how to further debug. > > > > I can post the patch to update the port if that'd help anyone debug. > > > > - Matthew Martin > > > > > > On Fri, Aug 21, 2015 at 3:50 PM, Peter Stephenson > > <p.w.stephenson@ntlworld.com> wrote: > > > A test version for the next release of zsh (which will be 5.1) can be > > > found in: > > > > > > http://www.zsh.org/pub/development/ > > > > > > If you get a chance, please try this out and report any problems. > > > > > > Thanks > > > pws > > Please do. Nothing interesting just deleting upstreamed patches and updating the plist and distinfo, but it's below. - Matthew Martin Index: Makefile =================================================================== RCS file: /cvs/ports/shells/zsh/Makefile,v retrieving revision 1.74 diff -u -p -r1.74 Makefile --- Makefile 28 Apr 2015 06:30:13 -0000 1.74 +++ Makefile 22 Aug 2015 00:40:44 -0000 @@ -2,16 +2,16 @@ COMMENT= Z shell, Bourne shell-compatible -V= 5.0.7 +V= 5.0.8-test-2 DISTNAME= zsh-$V -REVISION= 0 +PKGNAME= zsh-5.1 CATEGORIES= shells MAINTAINER= Pierre-Emmanuel Andre <pea@openbsd.org> HOMEPAGE= http://www.zsh.org/ -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=zsh/} +MASTER_SITES= http://www.zsh.org/pub/development/ # BSD PERMIT_PACKAGE_CDROM= Yes Index: distinfo =================================================================== RCS file: /cvs/ports/shells/zsh/distinfo,v retrieving revision 1.20 diff -u -p -r1.20 distinfo --- distinfo 22 Apr 2015 11:52:40 -0000 1.20 +++ distinfo 22 Aug 2015 00:40:44 -0000 @@ -1,2 +1,2 @@ -SHA256 (zsh-5.0.7.tar.gz) = Q/CkwXnvebuMkVNXVoX39F8oo2FcjPljRfUD1bnnuRk= -SIZE (zsh-5.0.7.tar.gz) = 4004964 +SHA256 (zsh-5.0.8-test-2.tar.gz) = J1mcILvDTA15G1trn+/pJ9mqEc5KJKsYmYU99BulGN0= +SIZE (zsh-5.0.8-test-2.tar.gz) = 4185609 Index: patches/patch-Completion_BSD_Command__bsd_pkg =================================================================== RCS file: /cvs/ports/shells/zsh/patches/patch-Completion_BSD_Command__bsd_pkg,v retrieving revision 1.2 diff -u -p -r1.2 patch-Completion_BSD_Command__bsd_pkg --- patches/patch-Completion_BSD_Command__bsd_pkg 29 Jan 2006 20:41:02 -0000 1.2 +++ patches/patch-Completion_BSD_Command__bsd_pkg 22 Aug 2015 00:40:44 -0000 @@ -33,21 +33,6 @@ $OpenBSD: patch-Completion_BSD_Command__ } (( $+functions[_bsd_pkg_pkgs_and_files] )) || -@@ -48,11 +52,11 @@ _bsd_pkg() { - pkg_add) - flags=( - '-f[force installation]' -- '-I[don'\''t execute installation scripts]' -+ '-I[don''t execute installation scripts]' - '-M[run in master mode]' -- '-n[don'\''t really install packages]' -+ '-n[don''t really install packages]' - '-p[specify prefix]:prefix directory:_files -/' -- '-R[don'\''t record]' -+ '-R[don''t record]' - '-S[run in slave mode]' - '-t[specify mktemp template]:mktemp template:_files -/' - '-v[be verbose]' @@ -67,9 +71,9 @@ _bsd_pkg() { ;; netbsd*) @@ -125,19 +110,6 @@ $OpenBSD: patch-Completion_BSD_Command__ ) ;; esac -@@ -124,10 +128,10 @@ _bsd_pkg() { - - pkg_delete) - flags=( -- '-D[don'\''t execute deinstallation scripts]' -+ '-D[don''t execute deinstallation scripts]' - '-d[remove empty directories]' - '-f[force deinstallation]' -- '-n[don'\''t really deinstall packages]' -+ '-n[don''t really deinstall packages]' - '-p[specify prefix]:prefix directory:_files -/' - '-v[be verbose]' - ) @@ -136,35 +140,43 @@ _bsd_pkg() { freebsd*) flags=( @@ -162,7 +134,7 @@ $OpenBSD: patch-Completion_BSD_Command__ + '(:)-a[delete all installed packages]' + '-F[specify each package by an installed file]' + '-i[be interactive]' -+ '-O[only delete the package''s entries]' ++ '-O[only delete the package'\''s entries]' '-R[delete upward recursively]' '-r[delete recursively]' - '-V[show version and exit]' Index: patches/patch-Completion_Base_Utility__call_program =================================================================== RCS file: patches/patch-Completion_Base_Utility__call_program diff -N patches/patch-Completion_Base_Utility__call_program --- patches/patch-Completion_Base_Utility__call_program 28 Apr 2015 06:30:13 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,19 +0,0 @@ -$OpenBSD: patch-Completion_Base_Utility__call_program,v 1.1 2015/04/28 06:30:13 jasper Exp $ - -be conservative about redirecting _call_program stderr, the caller may have -already done so -http://sourceforge.net/p/zsh/code/ci/22c4ea424ce2e8febce04d324c5ec9898f5d534b/ - ---- Completion/Base/Utility/_call_program.orig Sat Apr 25 20:20:25 2015 -+++ Completion/Base/Utility/_call_program Sat Apr 25 20:20:38 2015 -@@ -2,8 +2,8 @@ - - local tmp err_fd=-1 - --if (( ${debug_fd:--1} > 2 )) --then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is log file -+if (( ${debug_fd:--1} > 2 )) || [[ ! -t 2 ]] -+then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is trace or redirect - else exec {err_fd}>/dev/null - fi - Index: patches/patch-Doc_zsh_texi =================================================================== RCS file: /cvs/ports/shells/zsh/patches/patch-Doc_zsh_texi,v retrieving revision 1.8 diff -u -p -r1.8 patch-Doc_zsh_texi --- patches/patch-Doc_zsh_texi 22 Apr 2015 11:52:40 -0000 1.8 +++ patches/patch-Doc_zsh_texi 22 Aug 2015 00:40:44 -0000 @@ -12,75 +12,3 @@ $OpenBSD: patch-Doc_zsh_texi,v 1.8 2015/ @c %**end of header @ifinfo -@@ -4074,7 +4078,7 @@ you may see in your prompt (see - A history expansion begins with the first character of the @t{histchars} - parameter, which is `@t{!}' by default, and may occur anywhere on the - command line; history expansions do not nest. The `@t{!}' can be escaped --with `@t{\}' or can be enclosed between a pair of single quotes (@t{@value{dsq}}) -+with `@t{\}' or can be enclosed between a pair of single quotes (@t{'}@t{'}) - to suppress its special meaning. Double quotes will @emph{not} work for - this. Following this history character is an optional event designator - (@ref{Event Designators}) and then an optional word -@@ -10526,7 +10530,7 @@ For example, - @example - unsetopt localtraps - trap - INT --fn() @{ setopt localtraps; trap @value{dsq} INT; sleep 3; @} -+zstyle ':completion:*' group-name @t{'}@t{'} - @end example - - @noindent -@@ -20418,7 +20422,7 @@ zstyle ':completion:*:default' list-colors $@{(s.:.)LS - - @noindent - The default colors are the same as for the GNU @t{ls} command and can be --obtained by setting the style to an empty string (i.e. @t{@value{dsq}}). -+obtained by setting the style to an empty string (i.e. @t{'}@t{'}). - - @kindex list-dirs-first, completion style - @item @t{list-dirs-first} -@@ -20551,7 +20555,7 @@ generates no matches, case-insensitive completion: - - @noindent - @example --zstyle ':completion:*' matcher-list @value{dsq} 'm:@{a-zA-Z@}=@{A-Za-z@}' -+zstyle ':completion:*' matcher-list @t{'}@t{'} 'm:@{a-zA-Z@}=@{A-Za-z@}' - @end example - - @noindent -@@ -20577,7 +20581,7 @@ case-insensitive completion only with @t{_complete}: - @example - zstyle ':completion:*' completer _complete _prefix - zstyle ':completion:*:complete:*' matcher-list \ -- @value{dsq} 'm:@{a-zA-Z@}=@{A-Za-z@}' -+ @t{'}@t{'} 'm:@{a-zA-Z@}=@{A-Za-z@}' - @end example - - @noindent -@@ -24141,7 +24145,7 @@ generates at least one match. E.g.: - - @noindent - @example --compctl -M @value{dsq} 'm:@{a-zA-Z@}=@{A-Za-z@}' -+compctl -M @t{'}@t{'} 'm:@{a-zA-Z@}=@{A-Za-z@}' - @end example - - @noindent -@@ -24353,7 +24357,7 @@ use is - - @noindent - @example --compctl -D -f + -H 0 @value{dsq} -+compctl -D -f + -H 0 @t{'}@t{'} - @end example - - @noindent -@@ -24441,7 +24445,7 @@ performed on the first word in the range. For example - - @noindent - @example --compctl -x 'r[-exec,;]' -l @value{dsq} -- find -+compctl -x 'r[-exec,;]' -l @t{'}@t{'} -- find - @end example - - @noindent Index: patches/patch-Src_Modules_langinfo_c =================================================================== RCS file: patches/patch-Src_Modules_langinfo_c diff -N patches/patch-Src_Modules_langinfo_c --- patches/patch-Src_Modules_langinfo_c 22 Apr 2015 12:00:47 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,17 +0,0 @@ -$OpenBSD: patch-Src_Modules_langinfo_c,v 1.2 2015/04/22 12:00:47 jca Exp $ - -Fixed upstream: - http://sourceforge.net/p/zsh/code/ci/b4aa9cdc7641c6c923c1bda1c73111d80be79ba1/ - ---- Src/Modules/langinfo.c.orig Sat Mar 28 11:55:39 2015 -+++ Src/Modules/langinfo.c Sat Mar 28 11:56:37 2015 -@@ -395,7 +395,8 @@ liitem(const char *name) - static HashNode - getlanginfo(UNUSED(HashTable ht), const char *name) - { -- int len, *elem; -+ nl_item *elem; -+ int len; - char *listr, *nameu; - Param pm = NULL; - Index: pkg/PFRAG.shared =================================================================== RCS file: /cvs/ports/shells/zsh/pkg/PFRAG.shared,v retrieving revision 1.10 diff -u -p -r1.10 PFRAG.shared --- pkg/PFRAG.shared 2 Oct 2013 19:49:13 -0000 1.10 +++ pkg/PFRAG.shared 22 Aug 2015 00:40:45 -0000 @@ -1,4 +1,4 @@ -@comment $OpenBSD: PFRAG.shared,v 1.10 2013/10/02 19:49:13 gsoares Exp $ +@comment $OpenBSD$ lib/zsh/ lib/zsh/${V}/ lib/zsh/${V}/zsh/ Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/shells/zsh/pkg/PLIST,v retrieving revision 1.40 diff -u -p -r1.40 PLIST --- pkg/PLIST 22 Apr 2015 11:52:40 -0000 1.40 +++ pkg/PLIST 22 Aug 2015 00:40:45 -0000 @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.40 2015/04/22 11:52:40 jca Exp $ +@comment $OpenBSD$ @pkgpath shells/zsh,-main @shell bin/zsh %%SHARED%% @@ -67,6 +67,7 @@ share/zsh/${V}/functions/_acpi share/zsh/${V}/functions/_acpitool share/zsh/${V}/functions/_acroread share/zsh/${V}/functions/_adb +share/zsh/${V}/functions/_add-zsh-hook share/zsh/${V}/functions/_alias share/zsh/${V}/functions/_aliases share/zsh/${V}/functions/_all_labels @@ -102,6 +103,7 @@ share/zsh/${V}/functions/_bash_completio share/zsh/${V}/functions/_baz share/zsh/${V}/functions/_be_name share/zsh/${V}/functions/_beadm +share/zsh/${V}/functions/_beep share/zsh/${V}/functions/_bind_addresses share/zsh/${V}/functions/_bindkey share/zsh/${V}/functions/_bison @@ -111,12 +113,15 @@ share/zsh/${V}/functions/_bpython share/zsh/${V}/functions/_brace_parameter share/zsh/${V}/functions/_brctl share/zsh/${V}/functions/_bsd_pkg +share/zsh/${V}/functions/_bsdconfig +share/zsh/${V}/functions/_bsdinstall share/zsh/${V}/functions/_btrfs share/zsh/${V}/functions/_bts share/zsh/${V}/functions/_bug share/zsh/${V}/functions/_builtin share/zsh/${V}/functions/_bzip2 share/zsh/${V}/functions/_bzr +share/zsh/${V}/functions/_cabal share/zsh/${V}/functions/_cache_invalid share/zsh/${V}/functions/_cal share/zsh/${V}/functions/_calendar @@ -138,11 +143,14 @@ share/zsh/${V}/functions/_chown share/zsh/${V}/functions/_chrt share/zsh/${V}/functions/_chsh share/zsh/${V}/functions/_clay +share/zsh/${V}/functions/_cmdstring +share/zsh/${V}/functions/_cmp share/zsh/${V}/functions/_combination share/zsh/${V}/functions/_comm share/zsh/${V}/functions/_command share/zsh/${V}/functions/_command_names share/zsh/${V}/functions/_comp_locale +share/zsh/${V}/functions/_compadd share/zsh/${V}/functions/_compdef share/zsh/${V}/functions/_complete share/zsh/${V}/functions/_complete_debug @@ -175,12 +183,15 @@ share/zsh/${V}/functions/_cygstart share/zsh/${V}/functions/_dak share/zsh/${V}/functions/_darcs share/zsh/${V}/functions/_date +share/zsh/${V}/functions/_date_formats +share/zsh/${V}/functions/_dates share/zsh/${V}/functions/_dbus share/zsh/${V}/functions/_dchroot share/zsh/${V}/functions/_dchroot-dsa share/zsh/${V}/functions/_dcop share/zsh/${V}/functions/_dcut share/zsh/${V}/functions/_dd +share/zsh/${V}/functions/_deb_architectures share/zsh/${V}/functions/_deb_packages share/zsh/${V}/functions/_debchange share/zsh/${V}/functions/_debdiff @@ -210,7 +221,7 @@ share/zsh/${V}/functions/_django share/zsh/${V}/functions/_dladm share/zsh/${V}/functions/_dlocate share/zsh/${V}/functions/_dmidecode -share/zsh/${V}/functions/_docker +share/zsh/${V}/functions/_dnf share/zsh/${V}/functions/_domains share/zsh/${V}/functions/_dpatch-edit-patch share/zsh/${V}/functions/_dpkg @@ -230,6 +241,7 @@ share/zsh/${V}/functions/_dynamic_direct share/zsh/${V}/functions/_ecasound share/zsh/${V}/functions/_echotc share/zsh/${V}/functions/_echoti +share/zsh/${V}/functions/_elfdump share/zsh/${V}/functions/_elinks share/zsh/${V}/functions/_elm share/zsh/${V}/functions/_email_addresses @@ -245,6 +257,7 @@ share/zsh/${V}/functions/_expand share/zsh/${V}/functions/_expand_alias share/zsh/${V}/functions/_expand_word share/zsh/${V}/functions/_extensions +share/zsh/${V}/functions/_external_pwds share/zsh/${V}/functions/_fakeroot share/zsh/${V}/functions/_fc share/zsh/${V}/functions/_feh @@ -256,6 +269,7 @@ share/zsh/${V}/functions/_file_descripto share/zsh/${V}/functions/_file_systems share/zsh/${V}/functions/_files share/zsh/${V}/functions/_find +share/zsh/${V}/functions/_find_net_interfaces share/zsh/${V}/functions/_finger share/zsh/${V}/functions/_fink share/zsh/${V}/functions/_first @@ -339,8 +353,11 @@ share/zsh/${V}/functions/_iptables share/zsh/${V}/functions/_irssi share/zsh/${V}/functions/_ispell share/zsh/${V}/functions/_iwconfig +share/zsh/${V}/functions/_jails share/zsh/${V}/functions/_java share/zsh/${V}/functions/_java_class +share/zsh/${V}/functions/_jexec +share/zsh/${V}/functions/_jls share/zsh/${V}/functions/_jobs share/zsh/${V}/functions/_jobs_bg share/zsh/${V}/functions/_jobs_builtin @@ -408,6 +425,7 @@ share/zsh/${V}/functions/_metaflac share/zsh/${V}/functions/_mh share/zsh/${V}/functions/_mii-tool share/zsh/${V}/functions/_mime_types +share/zsh/${V}/functions/_mixerctl share/zsh/${V}/functions/_mkdir share/zsh/${V}/functions/_mkshortcut share/zsh/${V}/functions/_mkzsh @@ -444,6 +462,7 @@ share/zsh/${V}/functions/_next_label share/zsh/${V}/functions/_next_tags share/zsh/${V}/functions/_nice share/zsh/${V}/functions/_nkf +share/zsh/${V}/functions/_nl share/zsh/${V}/functions/_nm share/zsh/${V}/functions/_nmap share/zsh/${V}/functions/_nmcli @@ -466,6 +485,7 @@ share/zsh/${V}/functions/_pack share/zsh/${V}/functions/_parameter share/zsh/${V}/functions/_parameters share/zsh/${V}/functions/_patch +share/zsh/${V}/functions/_patchutils share/zsh/${V}/functions/_path_commands share/zsh/${V}/functions/_path_files share/zsh/${V}/functions/_pax @@ -524,6 +544,8 @@ share/zsh/${V}/functions/_pump share/zsh/${V}/functions/_putclip share/zsh/${V}/functions/_pydoc share/zsh/${V}/functions/_python +share/zsh/${V}/functions/_python_modules +share/zsh/${V}/functions/_qdbus share/zsh/${V}/functions/_qemu share/zsh/${V}/functions/_qiv share/zsh/${V}/functions/_qtplay @@ -533,8 +555,10 @@ share/zsh/${V}/functions/_rake share/zsh/${V}/functions/_ranlib share/zsh/${V}/functions/_rar share/zsh/${V}/functions/_rcs +share/zsh/${V}/functions/_rdesktop share/zsh/${V}/functions/_read share/zsh/${V}/functions/_read_comp +share/zsh/${V}/functions/_readelf share/zsh/${V}/functions/_readshortcut share/zsh/${V}/functions/_rebootin share/zsh/${V}/functions/_redirect @@ -556,6 +580,7 @@ share/zsh/${V}/functions/_rsync share/zsh/${V}/functions/_rubber share/zsh/${V}/functions/_ruby share/zsh/${V}/functions/_run-help +share/zsh/${V}/functions/_runit share/zsh/${V}/functions/_sablotron share/zsh/${V}/functions/_samba share/zsh/${V}/functions/_savecore @@ -597,6 +622,7 @@ share/zsh/${V}/functions/_stat share/zsh/${V}/functions/_stgit share/zsh/${V}/functions/_store_cache share/zsh/${V}/functions/_strace +share/zsh/${V}/functions/_strftime share/zsh/${V}/functions/_strip share/zsh/${V}/functions/_stty share/zsh/${V}/functions/_su @@ -614,6 +640,7 @@ share/zsh/${V}/functions/_svcs_fmri share/zsh/${V}/functions/_svn-buildpackage share/zsh/${V}/functions/_sysctl share/zsh/${V}/functions/_sysstat +share/zsh/${V}/functions/_systat share/zsh/${V}/functions/_system_profiler share/zsh/${V}/functions/_systemd share/zsh/${V}/functions/_tags @@ -647,6 +674,7 @@ share/zsh/${V}/functions/_tracepath share/zsh/${V}/functions/_trap share/zsh/${V}/functions/_tree share/zsh/${V}/functions/_ttyctl +share/zsh/${V}/functions/_ttys share/zsh/${V}/functions/_tune2fs share/zsh/${V}/functions/_twidge share/zsh/${V}/functions/_twisted @@ -681,6 +709,7 @@ share/zsh/${V}/functions/_vars share/zsh/${V}/functions/_vcsh share/zsh/${V}/functions/_vim share/zsh/${V}/functions/_vim-addons +share/zsh/${V}/functions/_vmstat share/zsh/${V}/functions/_vnc share/zsh/${V}/functions/_volume_groups share/zsh/${V}/functions/_vorbis @@ -693,6 +722,9 @@ share/zsh/${V}/functions/_wajig share/zsh/${V}/functions/_wakeup_capable_devices share/zsh/${V}/functions/_wanna-build share/zsh/${V}/functions/_wanted +share/zsh/${V}/functions/_watch +share/zsh/${V}/functions/_watch-snoop +share/zsh/${V}/functions/_wc share/zsh/${V}/functions/_webbrowser share/zsh/${V}/functions/_wget share/zsh/${V}/functions/_whereis @@ -721,6 +753,7 @@ share/zsh/${V}/functions/_x_visual share/zsh/${V}/functions/_x_window share/zsh/${V}/functions/_xargs share/zsh/${V}/functions/_xauth +share/zsh/${V}/functions/_xautolock share/zsh/${V}/functions/_xclip share/zsh/${V}/functions/_xdvi share/zsh/${V}/functions/_xfig @@ -739,15 +772,16 @@ share/zsh/${V}/functions/_xt_session_id share/zsh/${V}/functions/_xterm share/zsh/${V}/functions/_xv share/zsh/${V}/functions/_xwit +share/zsh/${V}/functions/_xxd share/zsh/${V}/functions/_xz share/zsh/${V}/functions/_yafc share/zsh/${V}/functions/_yast -share/zsh/${V}/functions/_yast2 share/zsh/${V}/functions/_yodl share/zsh/${V}/functions/_yp share/zsh/${V}/functions/_yum share/zsh/${V}/functions/_zargs share/zsh/${V}/functions/_zattr +share/zsh/${V}/functions/_zcalc share/zsh/${V}/functions/_zcalc_line share/zsh/${V}/functions/_zcat share/zsh/${V}/functions/_zcompile @@ -772,11 +806,14 @@ share/zsh/${V}/functions/_zstyle share/zsh/${V}/functions/_ztodo share/zsh/${V}/functions/_zypper share/zsh/${V}/functions/add-zsh-hook +share/zsh/${V}/functions/after share/zsh/${V}/functions/age share/zsh/${V}/functions/allopt share/zsh/${V}/functions/backward-kill-word-match share/zsh/${V}/functions/backward-word-match share/zsh/${V}/functions/bashcompinit +share/zsh/${V}/functions/before +share/zsh/${V}/functions/bracketed-paste-magic share/zsh/${V}/functions/calendar share/zsh/${V}/functions/calendar_add share/zsh/${V}/functions/calendar_edit @@ -860,16 +897,20 @@ share/zsh/${V}/functions/replace-string share/zsh/${V}/functions/replace-string-again share/zsh/${V}/functions/run-help share/zsh/${V}/functions/run-help-git +share/zsh/${V}/functions/run-help-ip share/zsh/${V}/functions/run-help-openssl share/zsh/${V}/functions/run-help-p4 share/zsh/${V}/functions/run-help-sudo share/zsh/${V}/functions/run-help-svk share/zsh/${V}/functions/run-help-svn +share/zsh/${V}/functions/select-bracketed +share/zsh/${V}/functions/select-quoted share/zsh/${V}/functions/select-word-style share/zsh/${V}/functions/send-invisible share/zsh/${V}/functions/smart-insert-last-word share/zsh/${V}/functions/split-shell-arguments share/zsh/${V}/functions/sticky-note +share/zsh/${V}/functions/surround share/zsh/${V}/functions/tcp_alias share/zsh/${V}/functions/tcp_close share/zsh/${V}/functions/tcp_command @@ -889,6 +930,7 @@ share/zsh/${V}/functions/tcp_spam share/zsh/${V}/functions/tcp_talk share/zsh/${V}/functions/tcp_wait share/zsh/${V}/functions/tetris +share/zsh/${V}/functions/tetriscurses share/zsh/${V}/functions/throw share/zsh/${V}/functions/transpose-lines share/zsh/${V}/functions/transpose-words-match ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: zsh 5.0.8-test-2 2015-08-22 0:10 ` Matthew Martin 2015-08-22 0:30 ` Michael Beasley @ 2015-08-22 11:48 ` Jun T. 2015-08-22 17:04 ` Matthew Martin 2015-08-23 8:31 ` Daniel Shahaf 1 sibling, 2 replies; 29+ messages in thread From: Jun T. @ 2015-08-22 11:48 UTC (permalink / raw) To: phy1729, zsh-users 2015/08/22 09:10, Matthew Martin <phy1729@gmail.com> wrote: > Running on an OpenBSD snapshot, test X02zlevi just hangs without any > output I've tested on my minimal install of OpenBSD 5.6. It seems the test hangs at line 24 of comptest (in function comptestinit()): zpty -r zsh log1 "*<PROMPT>*" || { Matthews, could you try with the patch at the end of this post? OpenBSD does not have /dev/ptmx (it has /dev/ptm instead), but has posix_openpt() function (OpenBSD 5.3 or later). In zsh-5.0.8, USE_DEV_PTMX is not defined on OpenBSD (because it does not have /dev/ptmx), and zpty.c uses the old BSD-style code (line 246 and below in zpty.c). In zsh-5.0.8-test-2 (or 5.1.0rc), configure.ac has changed and USE_DEV_PTMX is defined because posix_openpt() exists, so zpty.c uses posix_opennt() (HAVE_POSIX_OPENPT is also defined). It is OK if posix_openpt() really works, but the fact that X02zlevi hangs suggests that it is not working as we expect due to some unknown reasons. Simply undefining USE_DEV_PTMX seems to work on my OpenBSD. Jun diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c index 12e42b5..8fc6b21 100644 --- a/Src/Modules/zpty.c +++ b/Src/Modules/zpty.c @@ -154,7 +154,7 @@ getptycmd(char *name) return NULL; } -#ifdef USE_DEV_PTMX +#if defined(USE_DEV_PTMX) && !defined(__OpenBSD__) #ifdef HAVE_SYS_STROPTS_H #include <sys/stropts.h> ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: zsh 5.0.8-test-2 2015-08-22 11:48 ` Jun T. @ 2015-08-22 17:04 ` Matthew Martin 2015-08-23 8:31 ` Daniel Shahaf 1 sibling, 0 replies; 29+ messages in thread From: Matthew Martin @ 2015-08-22 17:04 UTC (permalink / raw) To: Jun T.; +Cc: zsh-users On Sat, Aug 22, 2015 at 08:48:47PM +0900, Jun T. wrote: > > 2015/08/22 09:10, Matthew Martin <phy1729@gmail.com> wrote: > > > Running on an OpenBSD snapshot, test X02zlevi just hangs without any > > output > > I've tested on my minimal install of OpenBSD 5.6. It seems the test > hangs at line 24 of comptest (in function comptestinit()): > > zpty -r zsh log1 "*<PROMPT>*" || { > > Matthews, could you try with the patch at the end of this post? With the patch all tests complete successfully. Thanks, Jun. - Matthew Martin ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: zsh 5.0.8-test-2 2015-08-22 11:48 ` Jun T. 2015-08-22 17:04 ` Matthew Martin @ 2015-08-23 8:31 ` Daniel Shahaf 2015-08-23 12:45 ` Jun T. 1 sibling, 1 reply; 29+ messages in thread From: Daniel Shahaf @ 2015-08-23 8:31 UTC (permalink / raw) To: Jun T.; +Cc: phy1729, zsh-users Jun T. wrote on Sat, Aug 22, 2015 at 20:48:47 +0900: > -#ifdef USE_DEV_PTMX > +#if defined(USE_DEV_PTMX) && !defined(__OpenBSD__) Wouldn't it be better to change configure to avoid defining the macro in the first place on OpenBSD? This would matter if more uses of USE_DEV_PTMX in C file are added: the knowledge that "don't USE_DEV_PTMX on OpenBSD" should be consolidated in one place. IIRC $OSTYPE is the variable to test. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: zsh 5.0.8-test-2 2015-08-23 8:31 ` Daniel Shahaf @ 2015-08-23 12:45 ` Jun T. 0 siblings, 0 replies; 29+ messages in thread From: Jun T. @ 2015-08-23 12:45 UTC (permalink / raw) To: zsh-users 2015/08/23 17:31, Daniel Shahaf <d.s@daniel.shahaf.name> wrote: > Jun T. wrote on Sat, Aug 22, 2015 at 20:48:47 +0900: >> -#ifdef USE_DEV_PTMX >> +#if defined(USE_DEV_PTMX) && !defined(__OpenBSD__) > > Wouldn't it be better to change configure to avoid defining the macro in > the first place on OpenBSD? Yes. But I wanted to make the change minimum just before the release of 8.1.0. It seems using /dev/ptm (or openpty()) is the standard method of allocating pty on OpenBSD. But I think it better to work on this after the release. ^ permalink raw reply [flat|nested] 29+ messages in thread
* string to array space problem in filenames 2015-08-21 20:50 zsh 5.0.8-test-2 Peter Stephenson 2015-08-22 0:10 ` Matthew Martin @ 2015-08-28 2:05 ` Ray Andrews 2015-08-28 3:15 ` Mikael Magnusson 2015-08-28 9:40 ` Peter Stephenson 1 sibling, 2 replies; 29+ messages in thread From: Ray Andrews @ 2015-08-28 2:05 UTC (permalink / raw) To: zsh-users Gentlemen: I should probably know this, but I'm rusty after a few months not thinking about zsh. I have a personal implementation of a dirstack that just pushes $PWD to the end of a file then rereads the file to an array which is then sent to 'select' to let me change directory. I like it because it survives reboot and works across xterms and removes duplicates and so on. The only thing that trips it up is when a directory is pushed that contains a space. I have few of those, so it's just an irritation, still I'd like to fix it if possible. Here's one of the offending directories: pts/1 HP-w5--5-Debian1 root /root/.icedove/Ray/Mail/Local Folders ... which 'select' does this with: 1) QUIT 2) /aWorking/Zsh 3) Folders 4) /root/.icedove/Ray/Mail/Local ... because it breaks at the space, obviously. Is there some way around that? I've tried various quotes and slashes and incantations and spells, but no luck. I expect that 'select' can't be expected to behave differently so somehow the array needs to know to protect spaces in directory names. I'm fuzzified why protecting them with quotes doesn't do it. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 2:05 ` string to array space problem in filenames Ray Andrews @ 2015-08-28 3:15 ` Mikael Magnusson 2015-08-28 18:54 ` Ray Andrews 2015-08-28 9:40 ` Peter Stephenson 1 sibling, 1 reply; 29+ messages in thread From: Mikael Magnusson @ 2015-08-28 3:15 UTC (permalink / raw) To: Ray Andrews; +Cc: Zsh Users On Fri, Aug 28, 2015 at 4:05 AM, Ray Andrews <rayandrews@eastlink.ca> wrote: > Gentlemen: > > I should probably know this, but I'm rusty after a few months not thinking > about zsh. I have a personal implementation of a dirstack that just pushes > $PWD to the end of a file then rereads the file to an array which is then > sent to 'select' to let me change directory. I like it because it survives > reboot and works across xterms and removes duplicates and so on. The only > thing that trips it up is when a directory is pushed that contains a space. > I have few of those, so it's just an irritation, still I'd like to fix it if > possible. Here's one of the offending directories: > > pts/1 HP-w5--5-Debian1 root /root/.icedove/Ray/Mail/Local Folders > > ... which 'select' does this with: > > > 1) QUIT > 2) /aWorking/Zsh > 3) Folders > 4) /root/.icedove/Ray/Mail/Local > > ... because it breaks at the space, obviously. Is there some way around > that? I've tried various quotes and slashes and incantations and spells, > but no luck. I expect that 'select' can't be expected to behave differently > so somehow the array needs to know to protect spaces in directory names. > I'm fuzzified why protecting them with quotes doesn't do it. You forgot to include your code in the mail. -- Mikael Magnusson ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 3:15 ` Mikael Magnusson @ 2015-08-28 18:54 ` Ray Andrews 2015-08-28 19:43 ` Bart Schaefer 0 siblings, 1 reply; 29+ messages in thread From: Ray Andrews @ 2015-08-28 18:54 UTC (permalink / raw) To: zsh-users On 08/27/2015 08:15 PM, Mikael Magnusson wrote: > On Fri, Aug 28, 2015 at 4:05 AM, Ray Andrews <rayandrews@eastlink.ca> wrote: > You forgot to include your code in the mail. At this point I'm hoping for a generic answer. Directory strings, separated by spaces, are written to a file, which is then read into an array and passed to 'select', but I need to protect spaces inside directory names. I expect the place to do it is here: echo -n " $PWD" >>! ~/.mydirstack; ... where I save the current directory. Somehow I need to protect any spaces in $PWD, and I'm sure it's easy if I could only remember how. I keep forgetting these simple things. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 18:54 ` Ray Andrews @ 2015-08-28 19:43 ` Bart Schaefer 2015-08-28 20:42 ` Ray Andrews ` (2 more replies) 0 siblings, 3 replies; 29+ messages in thread From: Bart Schaefer @ 2015-08-28 19:43 UTC (permalink / raw) To: Ray Andrews, zsh-users On Aug 28, 11:54am, Ray Andrews wrote: } } At this point I'm hoping for a generic answer. Directory strings, } separated by spaces, are written to a file, which is then read into an } array and passed to 'select' Unfortunately there are three different places where you might need to protect the spaces. (1) when writing to the file (2) when reading from the file (3) when passing to select. You've shown us one of them (more on that in a moment): } echo -n " $PWD" >>! ~/.mydirstack; What about the other two steps? Your first problem here is trying to maintain .mydirstack all as one line (echo -n) with spaces between the fields. You would be much better served by writing one file name per line and then splitting the file on newlines when reading it back. Out: echo "$PWD" >>| ~/.mydirstack In: mydirstack=( ${(f)"$(<~/.mydirstack)"} ) Then you should be able to do select dir in "${mydirstack[@]}"; do something with $dir; done If you insist on storing it all on one line, then you need to quote the spaces on the way out: echo -n " ${(q)PWD}" >>! ~/.mydirstack; And remove the quotes again sometime after reading it back in, but that is where what you have told us fails to go far enough. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 19:43 ` Bart Schaefer @ 2015-08-28 20:42 ` Ray Andrews 2015-08-28 20:56 ` Peter Stephenson 2015-09-03 3:37 ` Ray Andrews 2 siblings, 0 replies; 29+ messages in thread From: Ray Andrews @ 2015-08-28 20:42 UTC (permalink / raw) To: zsh-users On 08/28/2015 12:43 PM, Bart Schaefer wrote: > Your first problem here is trying to maintain .mydirstack all as one > line (echo -n) with spaces between the fields. You would be much > better served by writing one file name per line and then splitting > the file on newlines when reading it back. > > Out: > echo "$PWD" >>| ~/.mydirstack > In: > mydirstack=( ${(f)"$(<~/.mydirstack)"} ) > > Then you should be able to do > > select dir in "${mydirstack[@]}"; do something with $dir; done > > If you insist on storing it all on one line, Heck no, I don't insist on anything. The single line thing was the only way I could get it to work, but the above sounds very much better even on first reading. I'm still lacking free time, but I'll play with that and get back to you. Thanks as always Bart. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 19:43 ` Bart Schaefer 2015-08-28 20:42 ` Ray Andrews @ 2015-08-28 20:56 ` Peter Stephenson 2015-09-03 3:37 ` Ray Andrews 2 siblings, 0 replies; 29+ messages in thread From: Peter Stephenson @ 2015-08-28 20:56 UTC (permalink / raw) To: Bart Schaefer; +Cc: Ray Andrews, zsh-users On Fri, 28 Aug 2015 12:43:34 -0700 Bart Schaefer <schaefer@brasslantern.com> wrote: > Your first problem here is trying to maintain .mydirstack all as one > line (echo -n) with spaces between the fields. You would be much > better served by writing one file name per line and then splitting > the file on newlines when reading it back. In fact, the cdr suite (chpwd_recent_filehandler) does this as essentially print -rl -- ${(qqqq)array_of_dirs} The four q's means use $' style quoting for this. The advantage here is if a string contains a newline (bad karma for a directory, but let's think in general) it gets written as $'...\n...' --- so it's always safe to read back a single line at a time and strip the quotes with ${(Q)...}. For efficiency, in fact, it reads the file into an array of lines using ${(f)"$(<$file)"} and takes the lines out of that array. pws ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 19:43 ` Bart Schaefer 2015-08-28 20:42 ` Ray Andrews 2015-08-28 20:56 ` Peter Stephenson @ 2015-09-03 3:37 ` Ray Andrews 2015-09-03 4:48 ` Kurtis Rader 2015-09-03 5:25 ` Bart Schaefer 2 siblings, 2 replies; 29+ messages in thread From: Ray Andrews @ 2015-09-03 3:37 UTC (permalink / raw) To: zsh-users On 08/28/2015 12:43 PM, Bart Schaefer wrote: Bart, Got around to the spaces in filenames thing: > > If you insist on storing it all on one line, then you need to quote the > spaces on the way out: > > echo -n " ${(q)PWD}" >>! ~/.mydirstack; > > I've got it all more or less working except I can't figure out how to write the array--with newlines now, not with spaces--back to the file. Everything I try ends up on one line, which is now not what I want anymore. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-09-03 3:37 ` Ray Andrews @ 2015-09-03 4:48 ` Kurtis Rader 2015-09-03 5:25 ` Bart Schaefer 1 sibling, 0 replies; 29+ messages in thread From: Kurtis Rader @ 2015-09-03 4:48 UTC (permalink / raw) To: Ray Andrews; +Cc: Zsh Users [-- Attachment #1: Type: text/plain, Size: 893 bytes --] On Wed, Sep 2, 2015 at 8:37 PM, Ray Andrews <rayandrews@eastlink.ca> wrote: > On 08/28/2015 12:43 PM, Bart Schaefer wrote: > > Bart, > > Got around to the spaces in filenames thing: > >> >> If you insist on storing it all on one line, then you need to quote the >> spaces on the way out: >> >> echo -n " ${(q)PWD}" >>! ~/.mydirstack; >> >> I've got it all more or less working except I can't figure out how to > write the array--with newlines now, not with spaces--back to the file. > Everything I try ends up on one line, which is now not what I want anymore. > See the "F" flag in the "Parameter Expansion Flags" of the "man zshparam" page: Join the words of arrays together using newline as a separator. This is a shorthand for `pj:\n:'. For example: $ set -A x a b c $ echo $x a b c $ echo ${(F)x} a b c -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-09-03 3:37 ` Ray Andrews 2015-09-03 4:48 ` Kurtis Rader @ 2015-09-03 5:25 ` Bart Schaefer 2015-09-03 5:53 ` Mikael Magnusson 2015-09-03 15:23 ` Ray Andrews 1 sibling, 2 replies; 29+ messages in thread From: Bart Schaefer @ 2015-09-03 5:25 UTC (permalink / raw) To: zsh-users On Sep 2, 8:37pm, Ray Andrews wrote: } } I've got it all more or less working except I can't figure out how to } write the array--with newlines now, not with spaces--back to the file. You mean like: print -l "${array[@]}" > file ? (Or Kurtis's answer if you need the newlines in the string *before* it goes to the file.) ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-09-03 5:25 ` Bart Schaefer @ 2015-09-03 5:53 ` Mikael Magnusson 2015-09-03 15:23 ` Ray Andrews 1 sibling, 0 replies; 29+ messages in thread From: Mikael Magnusson @ 2015-09-03 5:53 UTC (permalink / raw) To: Bart Schaefer; +Cc: Zsh Users On Thu, Sep 3, 2015 at 7:25 AM, Bart Schaefer <schaefer@brasslantern.com> wrote: > On Sep 2, 8:37pm, Ray Andrews wrote: > } > } I've got it all more or less working except I can't figure out how to > } write the array--with newlines now, not with spaces--back to the file. > > You mean like: > > print -l "${array[@]}" > file > > ? > > (Or Kurtis's answer if you need the newlines in the string *before* it > goes to the file.) For print you also want -r -, and for echo you want -E -, so print -rl - "${array[@]}" > file or echo -E - ${(F)array} > file the -r/-E makes the builtins not expand \-sequences, and the - terminates the option list or you'd get % array=(-foo bar) % print -l ${(F)array} oo bar although if the paths are absolute, this is quite unlikely to be an issue, but it never hurts to have the - there. -- Mikael Magnusson ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-09-03 5:25 ` Bart Schaefer 2015-09-03 5:53 ` Mikael Magnusson @ 2015-09-03 15:23 ` Ray Andrews 2015-09-03 15:30 ` Mikael Magnusson 1 sibling, 1 reply; 29+ messages in thread From: Ray Andrews @ 2015-09-03 15:23 UTC (permalink / raw) To: zsh-users On 09/02/2015 10:25 PM, Bart Schaefer wrote: Thank you gentlemen, like riding a bike, it's easy if you know how: > You mean like: > > print -l "${array[@]}" > file > > Previous similar invocations of 'print' seemed to need this form: print -rlu2 "${array[@]}" > file ... which I took on faith, but as Bart shows, it seems that in this situation the 'ru2' are bad medicine. So my array reads/writes to file looking like this: /root /boot /aWorking/Zsh /root/.icedove/Ray/Mail/Local Folders /aRay /etc /aWorking ... spaces are protected, and it compresses fine. And select is happy. If it still works on Tuesdays so am I. So it was a useful exercise even if I now go on to see that 'cdr' does it all better anyway. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-09-03 15:23 ` Ray Andrews @ 2015-09-03 15:30 ` Mikael Magnusson 2015-09-03 15:58 ` Ray Andrews ` (2 more replies) 0 siblings, 3 replies; 29+ messages in thread From: Mikael Magnusson @ 2015-09-03 15:30 UTC (permalink / raw) To: Ray Andrews; +Cc: Zsh Users On Thu, Sep 3, 2015 at 5:23 PM, Ray Andrews <rayandrews@eastlink.ca> wrote: > On 09/02/2015 10:25 PM, Bart Schaefer wrote: > > Thank you gentlemen, like riding a bike, it's easy if you know how: >> >> You mean like: >> >> print -l "${array[@]}" > file >> >> > Previous similar invocations of 'print' seemed to need this form: > > print -rlu2 "${array[@]}" > file > > ... which I took on faith, but as Bart shows, it seems that in this > situation the 'ru2' > are bad medicine. -r is good to use as I explained in my other mail, -u2 means to print to stderr which would be a very strange thing to do here, since it won't go to 'file'. -- Mikael Magnusson ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-09-03 15:30 ` Mikael Magnusson @ 2015-09-03 15:58 ` Ray Andrews 2015-09-03 16:08 ` Peter Stephenson 2015-09-03 16:11 ` Ray Andrews [not found] ` <55E86E0C.1000806__15798.3473306105$1441295967$gmane$org@eastlink.ca> 2 siblings, 1 reply; 29+ messages in thread From: Ray Andrews @ 2015-09-03 15:58 UTC (permalink / raw) To: zsh-users On 09/03/2015 08:30 AM, Mikael Magnusson wrote: > -r is good to use as I explained in my other mail, -u2 means to print > to stderr which would be a very strange thing to do here, since it > won't go to 'file'. I was just typing a post to ask about that ... I'll take that on faith, however one further question: print -rl - "${array[@]}" > file ... do I or don't I like the double dash that seems to usually be there? And a few code specimens have shown no dash(es) at all there, which scares me since disaster is never far away from the unwary. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-09-03 15:58 ` Ray Andrews @ 2015-09-03 16:08 ` Peter Stephenson 0 siblings, 0 replies; 29+ messages in thread From: Peter Stephenson @ 2015-09-03 16:08 UTC (permalink / raw) To: zsh-users On Thu, 3 Sep 2015 08:58:04 -0700 Ray Andrews <rayandrews@eastlink.ca> wrote: > however one further question: > > print -rl - "${array[@]}" > file > > ... do I or don't I like the double dash that seems to usually be there? > And a few code specimens have shown no dash(es) at all there, which scares > me since disaster is never far away from the unwary. "-" is a longer standing way of doing things here; "--" is a more recent standard. Unless you're using a very old version of the shell it doesn't matter. Yes, getting into the habit of using those anyway is a good idea. If you're dealing with file names absolute paths, though, you'll get away with on this occasion. pws ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-09-03 15:30 ` Mikael Magnusson 2015-09-03 15:58 ` Ray Andrews @ 2015-09-03 16:11 ` Ray Andrews 2015-09-03 17:11 ` Ray Andrews [not found] ` <55E86E0C.1000806__15798.3473306105$1441295967$gmane$org@eastlink.ca> 2 siblings, 1 reply; 29+ messages in thread From: Ray Andrews @ 2015-09-03 16:11 UTC (permalink / raw) To: zsh-users On 09/03/2015 08:30 AM, Mikael Magnusson wrote: Ah, one more thing: input=( ${(f)"$(<~/.dirstack)"} ) ... as Bart showed, works fine, however the function that does the sorting and compressing I like available for other things, so I want to be able to use an argument there. While I was using the 'single line' version, like this: input=(${=@}) ... and the function itself called like this: compress_function `cat ~/.dirstack` ... but it no longer works with the 'newline' form. So how do I take input from an argument now? ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-09-03 16:11 ` Ray Andrews @ 2015-09-03 17:11 ` Ray Andrews 0 siblings, 0 replies; 29+ messages in thread From: Ray Andrews @ 2015-09-03 17:11 UTC (permalink / raw) To: zsh-users On 09/03/2015 09:11 AM, Ray Andrews wrote: > On 09/03/2015 08:30 AM, Mikael Magnusson wrote: > > > Ah, one more thing: > > input=( ${(f)"$(<~/.dirstack)"} ) > > ... as Bart showed, works fine, however the function that does the > sorting and > compressing I like available for other things, so I want to be able to > use > an argument there. While I was using the 'single line' version, like > this: > > input=(${=@}) > > ... and the function itself called like this: > > compress_function `cat ~/.dirstack` > ... but it no longer works with the 'newline' form. So how do I take > input > from an argument now? > > Therewego: compress_function `cat ~/.dirstack` ... is moronic. compress_function ~/.dirstack ...to pass the filename, and: input=( ${(f)"$(<$@)"} ) ... to grab the contents of the file. I won't say it's simple, but it sorta makes sense. ^ permalink raw reply [flat|nested] 29+ messages in thread
[parent not found: <55E86E0C.1000806__15798.3473306105$1441295967$gmane$org@eastlink.ca>]
* Re: string to array space problem in filenames [not found] ` <55E86E0C.1000806__15798.3473306105$1441295967$gmane$org@eastlink.ca> @ 2015-09-03 16:21 ` Stephane Chazelas 0 siblings, 0 replies; 29+ messages in thread From: Stephane Chazelas @ 2015-09-03 16:21 UTC (permalink / raw) To: Ray Andrews; +Cc: zsh-users 2015-09-03 08:58:04 -0700, Ray Andrews: > On 09/03/2015 08:30 AM, Mikael Magnusson wrote: > > >-r is good to use as I explained in my other mail, -u2 means to > >print to stderr which would be a very strange thing to do here, > >since it won't go to 'file'. > > I was just typing a post to ask about that ... I'll take that on > faith, however one further question: > > print -rl - "${array[@]}" > file > > ... do I or don't I like the double dash that seems to usually be there? > And a few code specimens have shown no dash(es) at all there, which scares > me since disaster is never far away from the unwary. An annoying thing with print -l (and it's the same with its standard equivalent printf '%s\n') is that you get the same output for an empty list and a list of one empty element. That is: list=() print -rl -- "$list[@]" list=('') print -rl -- "$list[@]" both print one empty line. so, strictly speaking, you need to write it: println() { [ "$#" -eq 0 ] || printf '%s\n' "$@" } println "$list[@]" -- Stephane ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 2:05 ` string to array space problem in filenames Ray Andrews 2015-08-28 3:15 ` Mikael Magnusson @ 2015-08-28 9:40 ` Peter Stephenson 2015-08-28 19:02 ` Ray Andrews 1 sibling, 1 reply; 29+ messages in thread From: Peter Stephenson @ 2015-08-28 9:40 UTC (permalink / raw) To: zsh-users On Thu, 27 Aug 2015 19:05:26 -0700 Ray Andrews <rayandrews@eastlink.ca> wrote: > I should probably know this, but I'm rusty after a few months not > thinking about zsh. I have a personal implementation of a dirstack that > just pushes $PWD to the end of a file then rereads the file to an array > which is then sent to 'select' to let me change directory. I like it > because it survives reboot and works across xterms and removes > duplicates and so on. This doesn't answer the question you've actually asked, but if you haven't (and in case I haven't mentioned it before) you might want to take a look at the section "REMEMBERING RECENT DIRECTORIES" in the zshcontrib manual as the "cdr" mechanism does all this with a certain amount of configuration. It looks like I wasn't particularly upfront about the fact that it removes duplicates from the list, so there's a patch below. The configuration I use with this is zstyle ':chpwd:*' recent-dirs-max 20 zstyle ':chpwd:*' recent-dirs-default true zstyle ':completion:*' recent-dirs-insert fallback which prunes the list of directories to 20 (unique) entries and also defaults to "cd" behaviour if the argument to cdr isn't a nubmer --- very useful with completion which gets configured above to allow completion of real directories, not just entries in the list: you can simply hit "tab" to cycle through them, most recently used first, even if what's on the command line is the name itself, and then edit the directory you're presented with in case it's in the target area but not the one you want. This has changed my life (in a small way, admittedly...) pws diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 4e87d41..db0940d 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -339,9 +339,13 @@ previous working directory from a list maintained automatically. It is similar in concept to the directory stack controlled by the tt(pushd), tt(popd) and tt(dirs) builtins, but is more configurable, and as it stores all entries in files it is maintained across sessions and (by default) -between terminal emulators in the current session. (The tt(pushd) -directory stack is not actually modified or used by tt(cdr) unless you -configure it to do so as described in the configuration section below.) +between terminal emulators in the current session. Duplicates are +automatically removed, so that the list reflects the single most recent +use of each directory. + +Note that the tt(pushd) directory stack is not actually modified or used +by tt(cdr) unless you configure it to do so as described in the +configuration section below. subsect(Installation) ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 9:40 ` Peter Stephenson @ 2015-08-28 19:02 ` Ray Andrews 2015-08-28 19:45 ` Bart Schaefer 0 siblings, 1 reply; 29+ messages in thread From: Ray Andrews @ 2015-08-28 19:02 UTC (permalink / raw) To: zsh-users On 08/28/2015 02:40 AM, Peter Stephenson wrote: Peter: > ... and as it stores all entries in files it is maintained across > sessions and (by default) -between terminal emulators in the current > session. ... That's exactly what my thing does. But I don't have any 'cdr' command here. Anyway, writing my thing was a useful exercise. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 19:02 ` Ray Andrews @ 2015-08-28 19:45 ` Bart Schaefer 2015-08-28 20:35 ` Ray Andrews 0 siblings, 1 reply; 29+ messages in thread From: Bart Schaefer @ 2015-08-28 19:45 UTC (permalink / raw) To: zsh-users On Aug 28, 12:02pm, Ray Andrews wrote: } } But I don't have any 'cdr' command here. It should be in your standard set of installed zsh functions. Read the manual section PWS indicated, instructions for ~/.zshrc configuration are included. ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: string to array space problem in filenames 2015-08-28 19:45 ` Bart Schaefer @ 2015-08-28 20:35 ` Ray Andrews 0 siblings, 0 replies; 29+ messages in thread From: Ray Andrews @ 2015-08-28 20:35 UTC (permalink / raw) To: zsh-users On 08/28/2015 12:45 PM, Bart Schaefer wrote: > On Aug 28, 12:02pm, Ray Andrews wrote: > } > } But I don't have any 'cdr' command here. > > It should be in your standard set of installed zsh functions. Read the > manual section PWS indicated, instructions for ~/.zshrc configuration > are included. > I keep forgetting about all that stuff. Such riches in there, so easy to overlook. Can't get it out of my head that you don't get that stuff on your path automatically. Hidden gems. I'll play with it, it will probably obviate my method but I'd still like to solve that space issue anyway as an exercise. ^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2015-09-03 17:11 UTC | newest] Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-08-21 20:50 zsh 5.0.8-test-2 Peter Stephenson 2015-08-22 0:10 ` Matthew Martin 2015-08-22 0:30 ` Michael Beasley 2015-08-22 0:45 ` Matthew Martin 2015-08-22 11:48 ` Jun T. 2015-08-22 17:04 ` Matthew Martin 2015-08-23 8:31 ` Daniel Shahaf 2015-08-23 12:45 ` Jun T. 2015-08-28 2:05 ` string to array space problem in filenames Ray Andrews 2015-08-28 3:15 ` Mikael Magnusson 2015-08-28 18:54 ` Ray Andrews 2015-08-28 19:43 ` Bart Schaefer 2015-08-28 20:42 ` Ray Andrews 2015-08-28 20:56 ` Peter Stephenson 2015-09-03 3:37 ` Ray Andrews 2015-09-03 4:48 ` Kurtis Rader 2015-09-03 5:25 ` Bart Schaefer 2015-09-03 5:53 ` Mikael Magnusson 2015-09-03 15:23 ` Ray Andrews 2015-09-03 15:30 ` Mikael Magnusson 2015-09-03 15:58 ` Ray Andrews 2015-09-03 16:08 ` Peter Stephenson 2015-09-03 16:11 ` Ray Andrews 2015-09-03 17:11 ` Ray Andrews [not found] ` <55E86E0C.1000806__15798.3473306105$1441295967$gmane$org@eastlink.ca> 2015-09-03 16:21 ` Stephane Chazelas 2015-08-28 9:40 ` Peter Stephenson 2015-08-28 19:02 ` Ray Andrews 2015-08-28 19:45 ` Bart Schaefer 2015-08-28 20:35 ` Ray Andrews
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).