Open vikramsubramanian opened 4 months ago
Summary: Issues with CLI backward search behavior and syntax highlighting.
Based on the provided information and code snippets, here is the solution to the issue:
Issue with cntrl + r
behavior:
CTRL_R
(which is not shown in the provided snippets but should be similar to other CTRL_
keybindings) to call a function that retrieves the last command from the history and displays it without requiring additional input.backward_search
or history_navigation
function to handle subsequent presses of CTRL_R
to navigate to previous commands.Issue with typing "node" after cntrl + r
:
incremental_search
function to filter the command history based on the input term after CTRL_R
is pressed.linenoiseEditHistoryNext
function (or similar) allows navigation through the filtered results with CTRL_P
and CTRL_N
for previous and next commands, respectively.Issue with syntax highlighting for "rdfgraph":
syntax_highlighting
rules or the highlightCallback
function to recognize "rdfgraph" as a single term.The relevant code snippets for these modifications are likely to be found in the linenoise.cpp
file, where keybindings and editing functionalities are implemented. The embedded_shell.cpp
file may contain the logic for syntax highlighting and should be reviewed for updates to the highlighting rules.
This file contains the key bindings and behavior for the shell, which is relevant to the issue of backward search and key press behavior.
tools/shell/embedded_shell.cpp
This file contains the shell prompt and syntax highlighting logic, which is relevant to the issue of syntax highlighting.
On my regular terminal (on Mac), if I have the following behavior, which does not exist in Kuzu shell: