83 if (argc > 1 && strcmp(
argv[1],
"-r") == 0) {
113 static char *olddir =
NULL;
115 const char *dir =
"~";
119 if (!strcmp(dir,
"-")) {
121 char *newdir = olddir;
179 for (
int i = 1;
i < argc;
i++) {
RZ_API char * rz_cmd_alias_get(RzCmd *cmd, const char *k, int remote)
RZ_IPI RzCmdStatus rz_cmd_shell_mv_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_uniq_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_cat_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_cd_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_rm_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_env_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_exit_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_echo_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_which_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_sleep_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_pwd_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_uname_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_ls_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_cp_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_fortune_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_sort_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_clear_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_shell_mkdir_handler(RzCore *core, int argc, const char **argv)
RZ_API void rz_cons_clear00(void)
RZ_API void rz_cons_newline(void)
RZ_API void * rz_cons_sleep_begin(void)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API void rz_cons_println(const char *str)
RZ_API void rz_cons_sleep_end(void *user)
static static fork const void static count static fd const char const char static newpath const char static path const char path
RZ_API void rz_core_fortune_print_random(RzCore *core)
RZ_API void Ht_() free(HtName_(Ht) *ht)
static static fork const void static count static fd const char const char static newpath char char argv
enum rz_cmd_status_t RzCmdStatus
@ RZ_CMD_STATUS_OK
command handler exited in the right way
@ RZ_CMD_STATUS_WRONG_ARGS
command handler could not handle the arguments passed to it
@ RZ_CMD_STATUS_ERROR
command handler had issues while running (e.g. allocation error, etc.)
@ RZ_CMD_STATUS_EXIT
command handler asks to exit the prompt loop
RZ_API bool rz_file_copy(const char *src, const char *dst)
RZ_API bool rz_file_rm(const char *file)
RZ_API char * rz_file_path(const char *bin)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API char * rz_str_array_join(const char **a, size_t n, const char *sep)
#define RZ_STR_ISEMPTY(x)
RZ_API RZ_OWN char * rz_strbuf_drain(RzStrBuf *sb)
RZ_API RzStrBuf * rz_strbuf_new(const char *s)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API char * rz_sys_getenv(const char *key)
Get the value of an environment variable named key or NULL if none exists.
RZ_API RZ_OWN char * rz_syscmd_cat(RZ_NONNULL const char *file)
RZ_API int rz_sys_setenv(const char *key, const char *value)
Set an environment variable in the calling process.
RZ_API RZ_OWN char * rz_syscmd_sort(RZ_NONNULL const char *file)
RZ_API RZ_OWN char * rz_syscmd_mkdir(RZ_NONNULL const char *dir)
RZ_API bool rz_sys_chdir(RZ_NONNULL const char *s)
Change current directory to s, taking care of home expansion ~.
RZ_API int rz_sys_system(const char *command)
RZ_API void rz_sys_info_free(RSysInfo *si)
RZ_API RSysInfo * rz_sys_info(void)
RZ_API char * rz_sys_getdir(void)
Get current working directory.
RZ_API int rz_sys_sleep(int secs)
Sleep for secs seconds.
RZ_API RZ_OWN char * rz_syscmd_uniq(RZ_NONNULL const char *file)
RZ_API char ** rz_sys_get_environ(void)
RZ_API RZ_OWN char * rz_syscmd_ls(RZ_NONNULL const char *input)
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)