xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit a228bb06be9bcd0e32d4888a13d18944968a4f8c

Rename output_to_custom_flist() to rn_for_flist()
Author: xaizek
Author date (UTC): 2020-02-06 14:22
Committer name: xaizek
Committer date (UTC): 2020-02-06 14:22
Parent(s): bdf4eb0fe9c72f572b3c8cf13712b5693de1ff6a
Signing key: 99DC5E4DB05F6BE2
Tree: a256f594c5e95106b43f450437924fbab009a119
File Lines added Lines deleted
src/menus/menus.c 1 1
src/running.c 2 3
src/running.h 1 1
tests/misc/flist_custom.c 2 2
File src/menus/menus.c changed (mode: 100644) (index 6c796ce3a..ce2cf1b8e)
... ... menus_capture(view_t *view, const char cmd[], int user_sh, menu_data_t *m,
841 841 if(custom_view || very_custom_view) if(custom_view || very_custom_view)
842 842 { {
843 843 menus_reset_data(m); menus_reset_data(m);
844 output_to_custom_flist(view, cmd, very_custom_view, 0);
844 rn_for_flist(view, cmd, very_custom_view, 0);
845 845 return 0; return 0;
846 846 } }
847 847
File src/running.c changed (mode: 100644) (index 62be457af..d1328f4c9)
... ... rn_ext(const char cmd[], MacroFlags flags, int bg, int *save_msg)
1227 1227 ONE_OF(flags, MF_VERYCUSTOMVIEW_OUTPUT, MF_VERYCUSTOMVIEW_IOUTPUT); ONE_OF(flags, MF_VERYCUSTOMVIEW_OUTPUT, MF_VERYCUSTOMVIEW_IOUTPUT);
1228 1228 const int interactive = const int interactive =
1229 1229 ONE_OF(flags, MF_CUSTOMVIEW_IOUTPUT, MF_VERYCUSTOMVIEW_IOUTPUT); ONE_OF(flags, MF_CUSTOMVIEW_IOUTPUT, MF_VERYCUSTOMVIEW_IOUTPUT);
1230 output_to_custom_flist(curr_view, cmd, very, interactive);
1230 rn_for_flist(curr_view, cmd, very, interactive);
1231 1231 } }
1232 1232 else else
1233 1233 { {
 
... ... run_in_split(const view_t *view, const char cmd[])
1357 1357 } }
1358 1358
1359 1359 int int
1360 output_to_custom_flist(view_t *view, const char cmd[], int very,
1361 int interactive)
1360 rn_for_flist(view_t *view, const char cmd[], int very, int interactive)
1362 1361 { {
1363 1362 char *title; char *title;
1364 1363 int error; int error;
File src/running.h changed (mode: 100644) (index f8017cc5e..10630b650)
... ... int rn_ext(const char cmd[], MacroFlags flags, int bg, int *save_msg);
81 81 /* Runs the cmd and parses its output as list of paths to compose custom view. /* Runs the cmd and parses its output as list of paths to compose custom view.
82 82 * Very custom view implies unsorted list. Returns zero on success, otherwise * Very custom view implies unsorted list. Returns zero on success, otherwise
83 83 * non-zero is returned. */ * non-zero is returned. */
84 int output_to_custom_flist(struct view_t *view, const char cmd[], int very,
84 int rn_for_flist(struct view_t *view, const char cmd[], int very,
85 85 int interactive); int interactive);
86 86
87 87 /* Executes external command capturing its output as list of lines. Sets *files /* Executes external command capturing its output as list of lines. Sets *files
File tests/misc/flist_custom.c changed (mode: 100644) (index f3d0107ea..9c6433389)
... ... TEST(files_with_newline_in_names, IF(filenames_can_include_newline))
458 458
459 459 create_file("a\nb"); create_file("a\nb");
460 460 assert_non_null(get_cwd(lwin.curr_dir, sizeof(lwin.curr_dir))); assert_non_null(get_cwd(lwin.curr_dir, sizeof(lwin.curr_dir)));
461 assert_success(output_to_custom_flist(&lwin, "cat list", 0, 0));
461 assert_success(rn_for_flist(&lwin, "cat list", 0, 0));
462 462 assert_success(unlink("a\nb")); assert_success(unlink("a\nb"));
463 463 assert_success(unlink("list")); assert_success(unlink("list"));
464 464
 
... ... TEST(current_directory_can_be_added_via_dot)
487 487 #endif #endif
488 488 stats_update_shell_type(cfg.shell); stats_update_shell_type(cfg.shell);
489 489
490 assert_success(output_to_custom_flist(&lwin, "echo ../misc", 0, 0));
490 assert_success(rn_for_flist(&lwin, "echo ../misc", 0, 0));
491 491
492 492 stats_update_shell_type("/bin/sh"); stats_update_shell_type("/bin/sh");
493 493 update_string(&cfg.shell, NULL); update_string(&cfg.shell, NULL);
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master