Commit 9a403458 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Add vim style exec

Thanks to bashseb for the patch.

Closes: #423
Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <>
parent 735b31e2
......@@ -524,8 +524,14 @@ cmd_exec(girara_session_t* session, girara_list_t* argument_list)
GIRARA_LIST_FOREACH(argument_list, char*, iter, value)
char* r = girara_replace_substring(value, "$FILE", path);
if (r != NULL) {
girara_list_iterator_set(iter, r);
char* s = girara_replace_substring(r, "%", path);
if (s != NULL) {
girara_list_iterator_set(iter, s);
GIRARA_LIST_FOREACH_END(argument_list, char*, iter, value);
......@@ -422,6 +422,7 @@ config_load_default(zathura_t* zathura)
girara_inputbar_command_add(gsession, "close", NULL, cmd_close, NULL, _("Close current file"));
girara_inputbar_command_add(gsession, "info", NULL, cmd_info, NULL, _("Show file information"));
girara_inputbar_command_add(gsession, "exec", NULL, cmd_exec, NULL, _("Execute a command"));
girara_inputbar_command_add(gsession, "!", NULL, cmd_exec, NULL, _("Execute a command")); /* like vim */
girara_inputbar_command_add(gsession, "help", NULL, cmd_help, NULL, _("Show help"));
girara_inputbar_command_add(gsession, "open", "o", cmd_open, cc_open, _("Open document"));
girara_inputbar_command_add(gsession, "quit", "q", cmd_quit, NULL, _("Close zathura"));
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment