I'm trying to define a new environment, which emulates a shell. The way I would like to use it:
\begin{shell}
\item{echo foo}{foo}
\item{echo bar}{bar}
\end{shell}
Which should produce:
This is my shell prompt
1> echo foo
foo
2> echo bar
bar
What I have so far:
\newcommand{shellprompt}{This is my shell prompt}
\newenvironment{shell}{
\shellprompt
\begin{enumerate}[\hspace{15px} 1\textgreater]
\let\olditem\item
\renewcommand\item{\olditem}
}{
\end{enumerate}
}
How do I redefine the \item command so it accepts a second parameter and prints it on a second line?
Bonus: How do I wrap everything (prompt + items) in a verbatim environment?

\item? You can define your own custom macro with any number of arguments, instead of redefining a macro already used by latex for other purposes. – JLDiaz Jul 23 '12 at 12:14