zsh-workers
 help / color / mirror / code / Atom feed
* Help with associative arrays
@ 2016-08-21 20:50 Vin Shelton
  2016-08-21 21:18 ` Lawrence Velázquez
  0 siblings, 1 reply; 4+ messages in thread
From: Vin Shelton @ 2016-08-21 20:50 UTC (permalink / raw)
  To: Zsh Hackers' List

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

I can't seem to figure this out.  I'm trying to use an associative array
and the results are not what I expect:

#!/usr/bin/env zsh

emulate -LR zsh

typeset -A repos
repos["conky"]="https://github.com/brndnmtthws/conky.git"

nickname="conky"
echo "nickname = " \"$nickname\" "repos = " \"${repos[$nickname]}\"
echo "nickname = " \"$nickname\" "repos = " \"${repos["conky"]}\"

yileds:

nickname =  "conky" repos =  ""
nickname =  "conky" repos =  "https://github.com/brndnmtthws/conky.git"

given that nickname is "conky" I expected the values to be the same.

Puzzled,
  Vin

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

end of thread, other threads:[~2016-08-23 15:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-21 20:50 Help with associative arrays Vin Shelton
2016-08-21 21:18 ` Lawrence Velázquez
2016-08-22 11:53   ` Vin Shelton
2016-08-23 15:54   ` Stephane Chazelas

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