Q:

read user input without interruption in bash

I'm trying to grep the user command into a variable.
If the command begins with specific words I'm redirecting the command into another shell (not BASH), if not it will run regularly on bash.
When I'm using "read" I lose the BASH prompt then I'm unable to auto-complete, backspace etc.
My goal is:
if I type for example ls -la the command will not run and will be assigned into  variable:
user@machine:~$ ls -la

user_command = 'ls -la'

if the command is not other shell command (not BASH)
eval $user_command

Is there any way to achieve this?

A:

I guess you want to :  invoke some specific commands through another shell instead of bash
You could define a function for each of those commands
exemple:
ls () { # function that, instead of bash, launch 'ls' through ksh
    ksh -c "ls $*"
}

that way, with each function's name matching the command you want to run with another shell (edit the inside of the function accordingly if it needs to be run with another shell than ksh)
Place those function in specific user's "~/.bashrc" files.

