In other *nix prompts, you can do history searches for partial commands. For instance, if you find yourself typing "telnet 192.168.1.12" repeatedly, you can type "tel and hit Page Up to search for the last command you typed that began with "tel" You can hit Page Up repeatedly to find the previous command that began the same way. You can also hit Page Down to go forward in the search if you hit Page Up too many times and missed the command you wanted.
Terminal uses Page Up and Page Down for scrolling, which is great for new users, but seriously slows power users down. Other unices use Shift-Page Up and Shift-PageDown for scrolling.
To restore command completion from history (in bash), you can use (mind the quotes!):
I put these commands in my .profile so that my terminal would always be configured to my tates. I'm sure there's an analogous command in tcsh.
On a side note, if you want a more powerful history search, you can hit Control-R to do a full interactive history search under bash. You hit Control-R at the prompt and type some text. Each letter you type will make the search more detailed. For example, if you want to find the last command that you executed with 192.168.1.12 as a parameter, you can hit Control-R and begin typing the IP. When you type the "1" the last command with a "1" in it will be displayed. When you type "9" the last command with a "19" in it will be displayed, and so on. Hitting Control-R again tries to find another command that matches.
Terminal uses Page Up and Page Down for scrolling, which is great for new users, but seriously slows power users down. Other unices use Shift-Page Up and Shift-PageDown for scrolling.
To restore command completion from history (in bash), you can use (mind the quotes!):
bind '"M-e": history-search-backward'This binds Option-E to the reverse search (Page Up on Linux) and Option-R to a forward search (Page Down on Linux). To use this, the "Option (alt) key acts as meta key" item under Emulation in Terminal preferences must be on.
bind '"M-r": history-search-forward'
I put these commands in my .profile so that my terminal would always be configured to my tates. I'm sure there's an analogous command in tcsh.
On a side note, if you want a more powerful history search, you can hit Control-R to do a full interactive history search under bash. You hit Control-R at the prompt and type some text. Each letter you type will make the search more detailed. For example, if you want to find the last command that you executed with 192.168.1.12 as a parameter, you can hit Control-R and begin typing the IP. When you type the "1" the last command with a "1" in it will be displayed. When you type "9" the last command with a "19" in it will be displayed, and so on. Hitting Control-R again tries to find another command that matches.
•
[5,673 views]

