[erlang-patches] Shell history search
Fri Jan 4 09:07:54 CET 2013
Must have missed to reply to you, your patch has been in 'master-pu'
branch since wednesday.
Thanks for your contribution.
BR Fredrik Gustafsson
Erlang OTP Team
On 12/22/2012 11:41 PM, Fred Hebert wrote:
> Hi, the following patch adds functionality to group.erl and edlin.erl in
> order to allow the user to search history.
> Search mode can be entered by pressing ctrl-r. Enter terms and press
> ctrl-r again to search backwards, or ctrl-s to then search forward (if
> you terminal doesn't eat up that one). Press enter to execute the line,
> or use tab, arrow keys, or other control sequences (^D, ^K, etc.) to
> exit search mode while remaining on the last found line.
> The search mode is a simpler version of the one available in bash or
> zsh shells.
> This adds a few modes to the shell (search, on top of none and meta) in
> group.erl for history search, and a few more in edlin.erl to change the
> meaning of control sequences while searching.
> This patch has been tested on OSX and some linux variants and worked
> I tested it on Windows, and neither do werl.exe, or erl.exe (under
> PowerShell or cmd.exe) capture the ^R and ^S sequences -- it will not
> work there, but will not break any existing functionality. As far as I'm
> aware, this is more likely a driver issue than an issue with the patch
> (^G is not captured in cmd.exe, ctrl+C works in none of the above, for
> git fetch git://github.com/ferd/otp.git shell_history_search
> Compare at:
> erlang-patches mailing list
More information about the erlang-patches