Radu Rădeanu Asked: 2013-07-07 02:26:25 +0800 CST2013-07-07 02:26:25 +0800 CST 2013-07-07 02:26:25 +0800 CST How to run specific commands without to press enter key 772 How can I run a specific command in terminal without to press Enter key after I typed the command? command-line 1 Answers Voted Best Answer Radu Rădeanu 2013-07-07T02:26:25+08:002013-07-07T02:26:25+08:00 You can use bind: bind -x '"<command>"':<command> For example bind -x '"ls"':ls will make that when you type only ls (not followed by Enter) to show directly the result of ls command. To make the change permanently, you can insert the previous line in ~/.bashrc file.
You can use
bind
:For example
bind -x '"ls"':ls
will make that when you type onlyls
(not followed by Enter) to show directly the result ofls
command.To make the change permanently, you can insert the previous line in
~/.bashrc
file.