mirror of
https://github.com/Savapitech/42sh.git
synced 2026-01-18 16:57:28 +01:00
Add ctrl+h
This commit is contained in:
@@ -127,3 +127,8 @@ bool handle_key_ctrl_r(readline_helper_t *rh, exec_ctx_t *ec, buff_t *buff)
|
||||
refresh_line(rh);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool handle_key_ctrl_h(readline_helper_t *rh, exec_ctx_t *ec, buff_t *buff)
|
||||
{
|
||||
return handle_backspace(rh, ec, buff);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ bool handle_key_ctrl_k(readline_helper_t *rh, exec_ctx_t *, buff_t *buff);
|
||||
bool handle_key_ctrl_w(readline_helper_t *rh, exec_ctx_t *, buff_t *buff);
|
||||
bool handle_key_ctrl_y(readline_helper_t *rh, exec_ctx_t *, buff_t *buff);
|
||||
bool handle_key_ctrl_r(readline_helper_t *rh, exec_ctx_t *ec, buff_t *buff);
|
||||
bool handle_key_ctrl_h(readline_helper_t *rh, exec_ctx_t *ec, buff_t *buff);
|
||||
bool handle_backspace(readline_helper_t *rh, exec_ctx_t *ec, buff_t *buff);
|
||||
bool handle_delete(readline_helper_t *rh, exec_ctx_t *, buff_t *buff);
|
||||
bool handle_key_tab(readline_helper_t *rh, exec_ctx_t *ec, buff_t *buff);
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include "ast.h"
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
#include "git.h"
|
||||
#include "repl.h"
|
||||
#include "repl/key_handler.h"
|
||||
@@ -31,6 +30,7 @@ const key_handler_t KEY_HANDLERS[] = {
|
||||
{"\031", handle_key_ctrl_y}, // ^Y
|
||||
{"\022", handle_key_ctrl_r}, // ^R
|
||||
{"\013", handle_key_ctrl_k}, // ^K
|
||||
{"\010", handle_key_ctrl_h}, // ^H
|
||||
{ESC "[A", handle_key_arrow_up},
|
||||
{ESC "[B", handle_key_arrow_down},
|
||||
{ESC "[C", handle_key_arrow_right},
|
||||
|
||||
Reference in New Issue
Block a user