scripting - Bash: Set up a new command on a new line without executing -
this question has answer here:
- how prefill command line input 1 answer
i'm trying write bash script output partially completed command can add parameters to, hit enter , run. want implemented in bash.
e.g.
~> ./test.sh ~> ls -al <cursor position here>
the variable i've found that's close prompt_command variable, when set inside test.sh 'ls -al', execute once script has exited.
is there way stop immediate execution, can add, say, *.log?
how about
read -e -p"$pwd> " -i"ls -al " cmd; eval "$cmd"
Comments
Post a Comment