Deniz, I don't think this is supported in emacs' *shell* buffer, but ESS's Julia REPL (in the *julia*) buffer supports looking up documentation with a question mark. For example, you can type ?qr at the prompt to get the docstring for the qr function.
Other than that, the @doc macro like Andrei Zh pointed out is very convenient, and should work everywhere, including in shell mode.
