summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorleo-arch <leonardoabramovich2@gmail.com>2023-03-24 16:50:46 -0300
committerleo-arch <leonardoabramovich2@gmail.com>2023-03-24 16:50:46 -0300
commitf213c84bc26d5e5827cf073d030f041cc7976aa8 (patch)
tree3f3f6a102a25a804155adce167e6dfa9139cbd6d
parent92fe359e9b69ed28aadc4284b3b776c527f0babf (diff)
Bump version to 1.11v1.11
-rw-r--r--src/helpers.h4
-rw-r--r--src/remotes.c41
-rw-r--r--src/tabcomp.c56
3 files changed, 58 insertions, 43 deletions
diff --git a/src/helpers.h b/src/helpers.h
index 94267cfa..bff2fcb3 100644
--- a/src/helpers.h
+++ b/src/helpers.h
@@ -130,10 +130,10 @@
#define PROGRAM_NAME "clifm"
#define PNL "clifm" /* Program name lowercase */
#define PROGRAM_DESC "The command line file manager"
-#define VERSION "1.11.rc6"
+#define VERSION "1.11"
#define AUTHOR "L. Abramovich"
#define CONTACT "https://github.com/leo-arch/clifm"
-#define DATE "Mar 23, 2023"
+#define DATE "Mar 24, 2023"
#define LICENSE "GPL2+"
#define COLORS_REPO "https://github.com/leo-arch/clifm-colors"
diff --git a/src/remotes.c b/src/remotes.c
index 714770cc..c9c4cf26 100644
--- a/src/remotes.c
+++ b/src/remotes.c
@@ -44,7 +44,8 @@ static int
remotes_list(void)
{
if (remotes_n == 0) {
- printf(_("%s: No remotes defined. Run 'net edit' to add one.\n"), PROGRAM_NAME);
+ printf(_("%s: No remotes defined. Run 'net edit' to add one.\n"),
+ PROGRAM_NAME);
return EXIT_SUCCESS;
}
@@ -62,11 +63,11 @@ remotes_list(void)
if (remotes[i].unmount_cmd)
printf(_(" Unmount command: %s\n"), remotes[i].unmount_cmd);
printf(_(" Auto-unmount: %s\n"), (remotes[i].auto_unmount == 0)
- ? _("false") : _("true"));
+ ? _("false") : _("true"));
printf(_(" Auto-mount: %s\n"), (remotes[i].auto_mount == 0)
- ? _("false") : _("true"));
- printf(_(" Mounted: %s%s%s\n"), BOLD, (remotes[i].mounted == 0) ? _("No")
- : _("Yes"), df_c);
+ ? _("false") : _("true"));
+ printf(_(" Mounted: %s%s%s\n"), BOLD, (remotes[i].mounted == 0)
+ ? _("No") : _("Yes"), df_c);
if (i < remotes_n - 1)
puts("");
}
@@ -83,7 +84,8 @@ dequote_remote_name(char *name)
strcpy(name, deq);
free(deq);
} else {
- _err(ERR_NO_STORE, NOPRINT_PROMPT, "net: %s: Error dequoting resource name\n", name);
+ _err(ERR_NO_STORE, NOPRINT_PROMPT, "net: %s: Error dequoting "
+ "resource name\n", name);
return EXIT_FAILURE;
}
}
@@ -118,7 +120,8 @@ get_remote(char *name)
}
if (!remotes[i].mountpoint) {
- fprintf(stderr, _("net: No mountpoint specified for '%s'\n"), remotes[i].name);
+ fprintf(stderr, _("net: No mountpoint specified for '%s'\n"),
+ remotes[i].name);
return (-1);
}
@@ -143,7 +146,8 @@ static inline int
cd_to_mountpoint(int i)
{
free(workspaces[cur_ws].path);
- workspaces[cur_ws].path = savestring(remotes[i].mountpoint, strlen(remotes[i].mountpoint));
+ workspaces[cur_ws].path = savestring(remotes[i].mountpoint,
+ strlen(remotes[i].mountpoint));
add_to_jumpdb(workspaces[cur_ws].path);
add_to_dirhist(workspaces[cur_ws].path);
@@ -157,14 +161,16 @@ cd_to_mountpoint(int i)
static inline int
print_cd_error(int i)
{
- _err(ERR_NO_STORE, NOPRINT_PROMPT, "net: %s: %s\n", remotes[i].mountpoint, strerror(errno));
+ _err(ERR_NO_STORE, NOPRINT_PROMPT, "net: %s: %s\n", remotes[i].mountpoint,
+ strerror(errno));
return EXIT_FAILURE;
}
static inline int
print_no_mount_cmd_error(int i)
{
- fprintf(stderr, _("net: No mount command specified for '%s'\n"), remotes[i].name);
+ fprintf(stderr, _("net: No mount command specified for '%s'\n"),
+ remotes[i].name);
return EXIT_FAILURE;
}
@@ -216,7 +222,8 @@ remotes_unmount(char *name)
return EXIT_FAILURE;
if (remotes[i].mounted == 0) {
- _err(ERR_NO_STORE, NOPRINT_PROMPT, _("net: %s: Not mounted\n"), remotes[i].name);
+ _err(ERR_NO_STORE, NOPRINT_PROMPT, _("net: %s: Not mounted\n"),
+ remotes[i].name);
return EXIT_FAILURE;
}
@@ -281,7 +288,8 @@ remotes_edit(char *app)
struct stat attr;
if (stat(remotes_file, &attr) == -1) {
- _err(ERR_NO_STORE, NOPRINT_PROMPT, "net: %s: %s\n", remotes_file, strerror(errno));
+ _err(ERR_NO_STORE, NOPRINT_PROMPT, "net: %s: %s\n", remotes_file,
+ strerror(errno));
return EXIT_FAILURE;
}
@@ -301,7 +309,8 @@ remotes_edit(char *app)
return ret;
if (stat(remotes_file, &attr) == -1) {
- _err(ERR_NO_STORE, NOPRINT_PROMPT, "net: %s: %s\n", remotes_file, strerror(errno));
+ _err(ERR_NO_STORE, NOPRINT_PROMPT, "net: %s: %s\n", remotes_file,
+ strerror(errno));
return errno;
}
@@ -379,7 +388,8 @@ automount_remotes(void)
}
int ret = 0;
- printf(_("%s: net: %s: Mounting remote...\n"), PROGRAM_NAME, remotes[i].name);
+ printf(_("%s: net: %s: Mounting remote...\n"), PROGRAM_NAME,
+ remotes[i].name);
if ((ret = launch_execle(remotes[i].mount_cmd)) != EXIT_SUCCESS) {
_err('w', PRINT_PROMPT, _("net: %s: Mount command failed with "
"error code %d\n"), remotes[i].name, ret);
@@ -420,7 +430,8 @@ autounmount_remotes(void)
}
int ret = 0;
- printf(_("%s: net: %s: Unmounting remote...\n"), PROGRAM_NAME, remotes[i].name);
+ printf(_("%s: net: %s: Unmounting remote...\n"), PROGRAM_NAME,
+ remotes[i].name);
if ((ret = launch_execle(remotes[i].unmount_cmd)) != EXIT_SUCCESS) {
fprintf(stderr, _("%s: net: %s: Unmount command failed with "
"error code %d\n"), PROGRAM_NAME, remotes[i].name, ret);
diff --git a/src/tabcomp.c b/src/tabcomp.c
index 2112fb8f..cba45d9e 100644
--- a/src/tabcomp.c
+++ b/src/tabcomp.c
@@ -770,35 +770,39 @@ run_finder(const size_t *height, const int *offset, const char *lw, const int mu
}
snprintf(cmd, sizeof(cmd), "fzf %s "
- "%s --margin=0,0,0,%d "
- "%s --read0 --ansi "
- "--query=\"%s\" %s %s %s %s %s "
- "< %s > %s",
- conf.fzftab_options,
- *height_str ? height_str : "", *offset,
- conf.case_sens_path_comp ? "+i" : "-i",
- lw ? lw : "", conf.colorize == 0 ? "--color=bw" : "",
- multi ? "--multi --bind tab:toggle+down,ctrl-s:select-all,\
+ "%s --margin=0,0,0,%d "
+ "%s --read0 --ansi "
+ "--query=\"%s\" %s %s %s %s %s "
+ "< %s > %s",
+ conf.fzftab_options,
+ *height_str ? height_str : "", *offset,
+ conf.case_sens_path_comp ? "+i" : "-i",
+ lw ? lw : "", conf.colorize == 0 ? "--color=bw" : "",
+ multi ? "--multi --bind tab:toggle+down,ctrl-s:select-all,\
ctrl-d:deselect-all,ctrl-t:toggle-all" : "",
- prev == 1 ? prev_str : "",
- (prev == 1 && prev_hidden == 1)
- ? "--preview-window=hidden --bind alt-p:toggle-preview" : "",
- *prev_opts ? prev_opts : "",
- finder_in_file, finder_out_file);
+ prev == 1 ? prev_str : "",
+ (prev == 1 && prev_hidden == 1)
+ ? "--preview-window=hidden --bind alt-p:toggle-preview" : "",
+ *prev_opts ? prev_opts : "",
+ finder_in_file, finder_out_file);
+
+/* snprintf(cmd, sizeof(cmd), "sk %s " // skim
+ "%s --margin=0,0,0,%d --color=16 "
+ "--read0 --ansi --inline-info "
+ "--layout=reverse-list --query=\"%s\" %s %s %s %s %s "
+ "< %s > %s",
+ conf.fzftab_options,
+ *height_str ? height_str : "", *offset,
+ lw ? lw : "", conf.colorize == 0 ? "--no-color" : "",
+ multi ? "--multi --bind tab:toggle+down,ctrl-s:select-all,\
+ctrl-d:deselect-all,ctrl-t:toggle-all" : "",
+ prev == 1 ? prev_str : "",
+ (prev == 1 && prev_hidden == 1)
+ ? "--preview-window=hidden --bind alt-p:toggle-preview" : "",
+ *prev_opts ? prev_opts : "",
+ finder_in_file, finder_out_file); */
}
-/* UNUSED(prev_str); UNUSED(prev_hidden);
- snprintf(cmd, sizeof(cmd), "sk " // skim
- "%s --margin=0,0,0,%d --color=16 "
- "--read0 --ansi --inline-info "
- "--layout=reverse-list --query=\"%s\" %s %s "
- "< %s > %s",
- *height_str ? height_str : "", *offset,
- lw ? lw : "", conf.colorize == 0 ? "--no-color" : "",
- multi ? "--multi --bind tab:toggle+down" : "",
- finder_in_file, finder_out_file);
- } */
-
int dr = (flags & DELAYED_REFRESH) ? 1 : 0;
flags &= ~DELAYED_REFRESH;
int ret = launch_execle(cmd); /* lgtm [cpp/command-line-injection] */