This is a neat idea (alias works in zsh, bash needs a script). Even better, perhaps our websites need to exclude $ from being copied the way line numbers are usually excluded.
zsh is generally wonderful, and it's sufficiently like bash/POSIX sh that it works.
However, it uses 1-indexed arrays, whereas bash uses 0-indexed arrays. This totally caught me out.