zsh-workers
 help / color / mirror / code / Atom feed
* bug: _store_cache and ksh arrays
@ 2004-10-19  2:48 Alexey Tourbin
  2004-10-19  4:54 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Tourbin @ 2004-10-19  2:48 UTC (permalink / raw)
  To: zsh-workers

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

Hello,

I think I found a bug.  _store_cache produces wrong output when
both KSH_TYPESET and MAGIC_EQUAL_SUBST are set.

Here's a piece of code:

  for var; do
    case ${(Pt)var} in
    (*readonly*) ;;
    (*(association|array)*) print -r "$var=( ${(kv@Pqq)^^var} )";;
    (*)                     print -r "$var=${(Pqq)^^var}";;
    esac
  done >! "$_cache_dir/$_cache_ident"

And here is how to reproduce a bug:

$ var=perl_modules
$ perl_modules=(AutoLoader DynaLoader SelfLoader)
$ emulate -R zsh
$ print -r "$var=( ${(kv@Pqq)^^var} )"
perl_modules=( 'AutoLoader' 'DynaLoader' 'SelfLoader' )
$ setopt KSH_TYPESET MAGIC_EQUAL_SUBST
$ print -r "$var=( ${(kv@Pqq)^^var} )"
perl_modules=( 'AutoLoader DynaLoader SelfLoader' )
$

So the cache data are unusable in the second case.
Actually this bug is not specific to _store_cache.

Any ideas?


-- 
Alexey Tourbin
ALT Linux Team

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-10-23 16:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-19  2:48 bug: _store_cache and ksh arrays Alexey Tourbin
2004-10-19  4:54 ` Bart Schaefer
2004-10-19 12:49   ` Alexey Tourbin
2004-10-19 14:15   ` Alexey Tourbin
2004-10-22 15:44     ` Bart Schaefer

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).