Lines Matching refs:cmd
52 const char *cmd; member
94 const char *cmd; member
101 if (strstarts(var, "pager.") && !strcmp(var + 6, c->cmd)) in pager_command_config()
107 static int check_pager_config(const char *cmd) in check_pager_config() argument
111 c.cmd = cmd; in check_pager_config()
120 if (strstarts(var, "tui.") && !strcmp(var + 4, c->cmd)) in browser_command_config()
122 if (strstarts(var, "gtk.") && !strcmp(var + 4, c->cmd)) in browser_command_config()
131 static int check_browser_config(const char *cmd) in check_browser_config() argument
135 c.cmd = cmd; in check_browser_config()
175 const char *cmd = (*argv)[0]; in handle_options() local
176 if (cmd[0] != '-') in handle_options()
184 if (!strcmp(cmd, "--help") || !strcmp(cmd, "--version")) in handle_options()
191 if (!strcmp(cmd, "-h")) { in handle_options()
196 if (!strcmp(cmd, "-v")) { in handle_options()
201 if (!strcmp(cmd, "-vv")) { in handle_options()
210 if (strstarts(cmd, CMD_EXEC_PATH)) { in handle_options()
211 cmd += strlen(CMD_EXEC_PATH); in handle_options()
212 if (*cmd == '=') in handle_options()
213 set_argv_exec_path(cmd + 1); in handle_options()
218 } else if (!strcmp(cmd, "--html-path")) { in handle_options()
221 } else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) { in handle_options()
223 } else if (!strcmp(cmd, "--no-pager")) { in handle_options()
227 } else if (!strcmp(cmd, "--debugfs-dir")) { in handle_options()
237 } else if (!strcmp(cmd, "--buildid-dir")) { in handle_options()
247 } else if (strstarts(cmd, CMD_DEBUGFS_DIR)) { in handle_options()
248 tracing_path_set(cmd + strlen(CMD_DEBUGFS_DIR)); in handle_options()
252 } else if (!strcmp(cmd, "--list-cmds")) { in handle_options()
257 printf("%s ", p->cmd); in handle_options()
261 } else if (!strcmp(cmd, "--list-opts")) { in handle_options()
270 } else if (!strcmp(cmd, "--debug")) { in handle_options()
281 fprintf(stderr, "Unknown option: %s\n", cmd); in handle_options()
302 use_browser = check_browser_config(p->cmd); in run_builtin()
305 use_pager = check_pager_config(p->cmd); in run_builtin()
351 const char *cmd = argv[0]; in handle_internal_command() local
357 argv[0] = cmd = "help"; in handle_internal_command()
362 if (strcmp(p->cmd, cmd)) in handle_internal_command()
370 char *cmd; in execv_dashed_external() local
374 if (asprintf(&cmd, "perf-%s", argv[0]) < 0) in execv_dashed_external()
384 argv[0] = cmd; in execv_dashed_external()
402 zfree(&cmd); in execv_dashed_external()
442 const char *cmd; in main() local
451 cmd = extract_argv0_path(argv[0]); in main()
452 if (!cmd) in main()
453 cmd = "perf-help"; in main()
477 if (strstarts(cmd, "perf-")) { in main()
478 cmd += 5; in main()
479 argv[0] = cmd; in main()
485 cmd -= 5; in main()
486 argv[0] = cmd; in main()
488 if (strstarts(cmd, "trace")) { in main()
515 cmd = argv[0]; in main()
544 cmd = argv[0] = help_unknown_cmd(cmd); in main()
551 cmd, str_error_r(errno, sbuf, sizeof(sbuf))); in main()