[erlang-patches] Shell history search
Fred Hebert
mononcqc@REDACTED
Tue Jan 8 13:49:37 CET 2013
Hi Fredrik,
It's done. From my understanding of the code, I simply needed to pass in
the encoding to the prompt_bytes/2 functions, and it seems to work fine.
Regards,
Fred.
On 01/08, Fredrik wrote:
> Hello Fred,
> You need to rebase upon 'master' branch and make changes to your
> patch, it fails to build on
> 'group.erl:536: function prompt_bytes/1 undefined'
>
> Let me know when you are done,
>
> BR Fredrik Gustafsson
> Erlang OTP Team
> On 01/04/2013 09:07 AM, Fredrik wrote:
> >Hello Fred,
> >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
> >>fine.
> >>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
> >>example).
> >>
> >>git fetch git://github.com/ferd/otp.git shell_history_search
> >>
> >>Compare at:
> >>
> >>https://github.com/ferd/otp/compare/erlang:master...ferd:shell_history_search
> >>
> >>https://github.com/ferd/otp/compare/erlang:master...ferd:shell_history_search.patch
> >>
> >>
> >>Regards,
> >>Fred.
> >>_______________________________________________
> >>erlang-patches mailing list
> >>erlang-patches@REDACTED
> >>http://erlang.org/mailman/listinfo/erlang-patches
> >
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
More information about the erlang-patches
mailing list