mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-26 00:55:59 +00:00
Add tabhelp exception for pf.<tab> ##shell
This commit is contained in:
parent
b18d0b0458
commit
d325aa5525
@ -1917,12 +1917,20 @@ static bool find_autocomplete(RCore *core, RLineCompletion *completion, RLineBuf
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool check_tabhelp_exceptions(const char *s) {
|
||||
if (r_str_startswith (s, "pf.")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
R_API void r_core_autocomplete(R_NULLABLE RCore *core, RLineCompletion *completion, RLineBuffer *buf, RLinePromptType prompt_type) {
|
||||
if (!core) {
|
||||
autocomplete_default (core, completion, buf);
|
||||
return;
|
||||
}
|
||||
if (r_config_get_b (core->config, "scr.prompt.tabhelp")) {
|
||||
const bool tabhelp_exception = check_tabhelp_exceptions (buf->data);
|
||||
if (!tabhelp_exception && r_config_get_b (core->config, "scr.prompt.tabhelp")) {
|
||||
if (buf->data[0] != '$' // handle aliases below
|
||||
&& strncmp (buf->data, "#!", 2) // rlang help fails
|
||||
&& !strchr (buf->data, ' ')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user