Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: '$1' indexing.
Hmm, you posted exactly this same thing with the subject "bug" on the
20th. Did you not see the replies? Yes, it's a bug, and a patch for
it has also been posted.
See http://www.zsh.org/mla/workers/2011/msg01456.html for explanation
and http://www.zsh.org/mla/workers/2011/msg01459.html for patch.
On Dec 22, 3:42pm, Ray Andrews wrote:
} Subject: '$1' indexing.
}
} Hi!
}
} First post. I thought I'd try zsh given how well spoken about it is. My
} first exercise has been to try to convert my bash functions to zsh, and
} it has not gone smoothly, but most problems have proved to be solvable.
} But what do you guys think of this:
}
} function z
} {
} var=$1
} echo "var:/${1:0:1}/${1:1:1}/${1:2:1}/"
} echo "var:/${var:0:1}/${var:1:1}/${var:2:1}/"
}
} }
}
} $ z abcde
}
} var: /a/a/b/
} var: /a/b/c/
}
} Surely the indexing of '$1' is wrong? I can assign the value to 'var'
} and all is well but I don't think I should have to.
}
} Thoughts?
}-- End of excerpt from Ray Andrews
Messages sorted by:
Reverse Date,
Date,
Thread,
Author