0

This might sound like a bizarre question, I'm just curious if it's possible. I want to redirect all input to a particular terminal (tilda) through a particular command (man) so that

$ ls

would bring up the man page for ls.

Does anyone know of any terminal or shell configurations that could make this possible? There's an option for running a custom command instead of the shell, but I'm not sure if it's possible to wait for the user to give an argument for that command.

0

Well, you could just do it with a while loop like

while read -r cmd; do
    man "$cmd"
done

then each time you type something and hit enter it'll man that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.