Add ot command as an alias for touch ##shell

This commit is contained in:
pancake 2022-11-02 21:17:17 +01:00 committed by pancake
parent a5145252d2
commit 272f3d56be
3 changed files with 6 additions and 1 deletions

View File

@ -26,6 +26,7 @@ static const char *help_msg_o[] = {
"on","[?][n] [file] 0x4000","map raw file at 0x4000 (no r_bin involved)",
"oo","[?][+bcdnm]","reopen current file (see oo?) (reload in rw or debugger)",
"op","[r|n|p|fd]", "select priorized file by fd (see ob), opn/opp/opr = next/previous/rotate",
"ot"," [file]", "same as `touch [file]`",
"oq","","list all open files",
"ox", " fd fdx", "exchange the descs of fd and fdx and keep the mapping",
NULL
@ -1840,6 +1841,9 @@ static int cmd_open(void *data, const char *input) {
r_core_cmd_help_match (core, help_msg_o, "of", true);
}
return 0;
case 't': // "ot"
r_core_cmd_strf (core, "touch%s", input + 1);
return 0;
case 'p': // "op"
/* handle prioritize */
if (input[1]) {

View File

@ -1434,7 +1434,7 @@ static int cmd_type(void *data, const char *input) {
if (arg) {
r_file_touch (arg + 1);
} else {
eprintf ("Usage: touch [filename]\n");
eprintf ("Usage: ot|touch [filename]\n");
}
} else if (input[1] == 's') {
const char *dbpath = input + 3;

View File

@ -29,6 +29,7 @@ if [ ! -d "$WASI_SDK" ]; then
fi
export CFLAGS="-D_WASI_EMULATED_SIGNAL -O2 -D__wasi__=1"
export CFLAGS="${CFLAGS} -D_WASI_EMULATED_PROCESS_CLOCKS=1"
cp -f dist/plugins-cfg/plugins.wasi.cfg plugins.cfg