mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-13 18:32:56 +00:00
Query the user before running the .r2 companion file
This commit is contained in:
parent
0d95b7f469
commit
e811e2647b
@ -1223,10 +1223,11 @@ int main(int argc, char **argv, char **envp) {
|
||||
char f[128];
|
||||
snprintf (f, sizeof (f), "%s.r2", pfile);
|
||||
if (r_file_exists (f)) {
|
||||
if (!quiet) {
|
||||
eprintf ("NOTE: Loading '%s' script.\n", f);
|
||||
// TODO: should 'q' unset the interactive bit?
|
||||
bool isInteractive = r_config_get_i (r.config, "scr.interactive");
|
||||
if (isInteractive && r_cons_yesno ('n', "Do you want to run the '%s' script? (y/N) ", f)) {
|
||||
r_core_cmd_file (&r, f);
|
||||
}
|
||||
r_core_cmd_file (&r, f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user