Skip to content

Commit

Permalink
User 'hidden files' instead of 'dotfiles'
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-arch committed Mar 10, 2025
1 parent a0b48a8 commit 78f3717
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ open-config:\\e[21~\n\
open-bookmarks:\\e[23~\n\
quit:\\e[24~\n\
\n\
# Plugins\n\
# Keybindings for plugins\n\
# 1) Make sure your plugin is in the plugins directory (or use any of the\n\
# plugins in there)\n\
# 2) Link pluginx to your plugin using the 'actions edit' command. E.g.:\n\
Expand Down
4 changes: 2 additions & 2 deletions src/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,11 +868,11 @@ hidden_files_function(const char *arg)
} else if (strcmp(arg, "off") == 0) {
conf.show_hidden = 0;
if (conf.autols == 1) reload_dirlist();
print_reload_msg(NULL, NULL, _("Hiding dotfiles\n"));
print_reload_msg(NULL, NULL, _("Hidden files: off\n"));
} else if (strcmp(arg, "on") == 0) {
conf.show_hidden = 1;
if (conf.autols == 1) reload_dirlist();
print_reload_msg(NULL, NULL, _("Showing dotfiles\n"));
print_reload_msg(NULL, NULL, _("Hidden files: on\n"));
}

update_autocmd_opts(AC_SHOW_HIDDEN);
Expand Down
18 changes: 10 additions & 8 deletions src/keybinds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1287,8 +1287,8 @@ load_keybinds(void)
if (!tmp || !*(tmp + 1))
continue;

/* Now copy left and right value of each keybind to the
* keybinds struct. */
/* Now copy left and right values of each keybinding to the
* kbinds struct. */
kbinds = xnrealloc(kbinds, kbinds_n + 1, sizeof(struct kbinds_t));
kbinds[kbinds_n].key = savestring(tmp + 1, strlen(tmp + 1));

Expand Down Expand Up @@ -1337,7 +1337,7 @@ rl_update_prompt_old(void)
}
#endif /* __HAIKU__ || !_NO_PROFILES */

/* Runs any command recognized by Clifm via a keybind. Example:
/* Run any command recognized by Clifm via a keybind. Example:
* keybind_exec_cmd("sel *") */
int
keybind_exec_cmd(char *str)
Expand Down Expand Up @@ -1438,10 +1438,12 @@ rl_toggle_max_filename_len(int count, int key)
reload_dirlist();
}

if (conf.max_name_len == UNSET)
if (conf.max_name_len == UNSET) {
print_reload_msg(NULL, NULL, _("Max name length unset\n"));
else
print_reload_msg(NULL, NULL, _("Max name length set to %d\n"), conf.max_name_len);
} else {
print_reload_msg(NULL, NULL, _("Max name length set to %d\n"),
conf.max_name_len);
}

xrl_reset_line_state();
return FUNC_SUCCESS;
Expand Down Expand Up @@ -2109,9 +2111,9 @@ rl_toggle_hidden_files(int count, int key)
}

if (conf.show_hidden > 0)
print_reload_msg(NULL, NULL, _("Showing dotfiles\n"));
print_reload_msg(NULL, NULL, _("Hidden files: on\n"));
else
print_reload_msg(NULL, NULL, _("Hiding dotfiles\n"));
print_reload_msg(NULL, NULL, _("Hidden files: off\n"));

xrl_reset_line_state();
return FUNC_SUCCESS;
Expand Down

0 comments on commit 78f3717

Please sign in to comment.