mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-02 11:43:23 +00:00
Add "lua" as an alias for "#!lua" ##lang
This commit is contained in:
parent
3b033951be
commit
3cf4f66811
@ -77,6 +77,7 @@ static RCoreHelpMessage help_msg_dollar = {
|
||||
|
||||
static RCoreHelpMessage help_msg_l = {
|
||||
"Usage:", "l[erls] [arg]", "Internal less (~..) and file listing (!ls)",
|
||||
"lu", " [path]", "same as #!lua",
|
||||
"ll", " [path]", "same as ls -l",
|
||||
"lr", " [path]", "same as ls -r",
|
||||
"ls", " [-e,-l,-j,-q] [path]", "list files in current or given directory",
|
||||
@ -1511,6 +1512,18 @@ static int cmd_l(void *data, const char *input) { // "l"
|
||||
}
|
||||
cmd_lr (core, arg);
|
||||
break;
|
||||
case 'u': // "lu"(a) - short for #!lua
|
||||
{
|
||||
const char *arg = strchr (input, ' ');
|
||||
if (arg) {
|
||||
char *cmd = r_str_newf ("#!lua %s", r_str_trim_head_ro (arg + 1));
|
||||
r_core_cmd0 (core, cmd);
|
||||
free (cmd);
|
||||
} else {
|
||||
r_core_cmd0 (core, "#!lua");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 's': // "ls"
|
||||
if (input[1] == '?') {
|
||||
r_core_cmd_help_match (core, help_msg_l, "ls", true);
|
||||
|
@ -2751,7 +2751,7 @@ static void __init_autocomplete_default(RCore* core) {
|
||||
".", "..", ".*", "/F", "/m", "!", "!!", "#!c", "#!v", "#!cpipe", "#!qjs", "#!tiny", "#!vala", "v.",
|
||||
"#!rust", "#!zig", "#!pipe", "#!python", "aeli", "arp", "arpg", "dmd", "drp", "drpg", "oe", "ot", "o+", "o++", "on", "o",
|
||||
"idp", "idpi", "L", "obf", "o+", "oc", "of", "r2", "rabin2", "rasm2", "rahash2", "rax2",
|
||||
"rafind2", "cd", "ls", "on", "wf", "rm", "wF", "wp", "Sd", "Sl", "to", "pm",
|
||||
"rafind2", "cd", "ls", "lua", "on", "wf", "rm", "wF", "wp", "Sd", "Sl", "to", "pm",
|
||||
"/m", "zos", "zfd", "zfs", "zfz", "cat", "wta", "wtf", "wxf", "dml", "dd", "dd+",
|
||||
"vi", "vim", "nvi", "neovim", "nvim", "nano",
|
||||
#if __WINDOWS__
|
||||
|
Loading…
x
Reference in New Issue
Block a user