You're viewing a comment by libdave and its responses.

April 22, 2010, 12:08

Almost forgot the follow up function to make it easier:
eval "print -s ${1?no variable}=\'\$$1\'"

then do this:
X='xyzzy plugh'

foo X

then edit your history

Comment Responses

April 22, 2010, 23:06

Hmm.. Can you explain this a bit more? I don't understand it.

May 19, 2010, 13:21

What he's doing is first he sets PATH to itself (eval PATH=$PATH), which leaves him with something like
in his history. Then he just uses the editor to modify this and run it again, thus setting PATH to the modified value.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "linux_212": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.