Reputation: 343
I'm trying to do the following:
...$ left=$'\e[D'
...$ read -e -i "prompt${left}" line
I'd like to get prompt
with cursor on t
, but I get:
prompt^[[D
any ideas? Seems as if I cannot binding keystrokes with -i
option
Upvotes: 0
Views: 86
Reputation: 26447
On the command line, we can bind the read
command to a function key :
bind '"'$(tput kf5)$'":"read -e -i prompt\n\e[D"'
You press F5
to run read
Upvotes: 0