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 5e0b3998be9e048ab997589fa61a328ffd1d26f1

Allow using of macros with :clone command
Author: xaizek
Author date (UTC): 2012-02-18 12:36
Committer name: xaizek
Committer date (UTC): 2012-02-18 17:45
Parent(s): b2c5168664ac02f138bcb1b9332537a4b817924c
Signing key:
Tree: 54fb82327ade8c82f77d7b0aad4640d75f4804f5
File Lines added Lines deleted
ChangeLog 2 0
data/vifm.1 4 4
data/vim/doc/vifm.txt 4 3
src/commands.c 3 1
File ChangeLog changed (mode: 100644) (index c0aa48a83..a2a2a89a9)
74 74
75 75 Removed odd sorting keys on Windows. Removed odd sorting keys on Windows.
76 76
77 Allowed using of macros with :clone command.
78
77 79 Fixed bug with fixed-length buffer for :grep command (when many files are Fixed bug with fixed-length buffer for :grep command (when many files are
78 80 selected). selected).
79 81
File data/vifm.1 changed (mode: 100644) (index 6760f6d0d..6687c4bf7)
1 .TH vifm 1 "February 11, 2012" "" "Vifm"
1 .TH vifm 1 "February 18, 2012" "" "Vifm"
2 2 .\" --------------------------------------------------------------------------- .\" ---------------------------------------------------------------------------
3 3 .SH NAME .SH NAME
4 4 .\" --------------------------------------------------------------------------- .\" ---------------------------------------------------------------------------
 
... ... changes owner and/or group of files. Operates on directories recursively.
829 829 .TP .TP
830 830 .BI :[range]clone[!?] .BI :[range]clone[!?]
831 831 clones files in current directory. With "?" vifm will open vi to edit clones files in current directory. With "?" vifm will open vi to edit
832 filenames. "!" forces overwrite.
832 filenames. "!" forces overwrite. Macros are expanded.
833 833 .TP .TP
834 834 .BI ":[range]clone[!] path" .BI ":[range]clone[!] path"
835 835 clones files to directory specified with the path (absolute or relative to clones files to directory specified with the path (absolute or relative to
836 current directory). "!" forces overwrite.
836 current directory). "!" forces overwrite. Macros are expanded.
837 837 .TP .TP
838 838 .BI ":[range]clone[!] name1 name2..." .BI ":[range]clone[!] name1 name2..."
839 839 clones files in current directory giving each next clone a corresponding name clones files in current directory giving each next clone a corresponding name
840 from the argument list. "!" forces overwrite.
840 from the argument list. "!" forces overwrite. Macros are expanded.
841 841 .TP .TP
842 842 .BI :colo[rscheme]? .BI :colo[rscheme]?
843 843 prints current color scheme name in the status bar. prints current color scheme name in the status bar.
File data/vim/doc/vifm.txt changed (mode: 100644) (index e96049424..fde877ba5)
... ... The builtin commands are:
746 746
747 747 *vifm-:clone* *vifm-:clone*
748 748 :[range]clone[!?] - clones files in current directory. With "?" vifm will :[range]clone[!?] - clones files in current directory. With "?" vifm will
749 open vi to edit filenames. "!" forces overwrite.
749 open vi to edit filenames. "!" forces overwrite. Macros are expanded.
750 750 :[range]clone[!] path - clones files to directory specified with the path :[range]clone[!] path - clones files to directory specified with the path
751 (absolute or relative to current directory).
751 (absolute or relative to current directory). Macros are expanded.
752 752 :[range]clone[!] name1 name2... - clones files in current directory giving :[range]clone[!] name1 name2... - clones files in current directory giving
753 each next clone a corresponding name from the argument list.
753 each next clone a corresponding name from the argument list. Macros
754 are expanded.
754 755
755 756 *vifm-:colorscheme* *vifm-:colo* *vifm-:colorscheme* *vifm-:colo*
756 757 :colo[rscheme]? - prints current color scheme name in the status bar. :colo[rscheme]? - prints current color scheme name in the status bar.
File src/commands.c changed (mode: 100644) (index d7f9fa012..e3dfe1a62)
... ... static const cmd_add_t commands[] = {
287 287 .handler = chmod_cmd, .qmark = 0, .expand = 0, .cust_sep = 0, .min_args = 0, .max_args = 0, .select = 1, }, .handler = chmod_cmd, .qmark = 0, .expand = 0, .cust_sep = 0, .min_args = 0, .max_args = 0, .select = 1, },
288 288 #endif #endif
289 289 { .name = "clone", .abbr = NULL, .emark = 1, .id = -1, .range = 1, .bg = 0, .quote = 1, .regexp = 0, { .name = "clone", .abbr = NULL, .emark = 1, .id = -1, .range = 1, .bg = 0, .quote = 1, .regexp = 0,
290 .handler = clone_cmd, .qmark = 1, .expand = 0, .cust_sep = 0, .min_args = 0, .max_args = NOT_DEF, .select = 1, },
290 .handler = clone_cmd, .qmark = 1, .expand = 1, .cust_sep = 0, .min_args = 0, .max_args = NOT_DEF, .select = 1, },
291 291 { .name = "cmap", .abbr = "cm", .emark = 0, .id = -1, .range = 0, .bg = 0, .quote = 0, .regexp = 0, { .name = "cmap", .abbr = "cm", .emark = 0, .id = -1, .range = 0, .bg = 0, .quote = 0, .regexp = 0,
292 292 .handler = cmap_cmd, .qmark = 0, .expand = 0, .cust_sep = 0, .min_args = 0, .max_args = NOT_DEF, .select = 0, }, .handler = cmap_cmd, .qmark = 0, .expand = 0, .cust_sep = 0, .min_args = 0, .max_args = NOT_DEF, .select = 0, },
293 293 { .name = "cnoremap", .abbr = "cno", .emark = 0, .id = -1, .range = 0, .bg = 0, .quote = 0, .regexp = 0, { .name = "cnoremap", .abbr = "cno", .emark = 0, .id = -1, .range = 0, .bg = 0, .quote = 0, .regexp = 0,
 
... ... char *
1949 1949 expand_macros(FileView *view, const char *command, const char *args, expand_macros(FileView *view, const char *command, const char *args,
1950 1950 int *use_menu, int *split) int *use_menu, int *split)
1951 1951 { {
1952 /* TODO: refactor this function expand_macros() */
1953
1952 1954 size_t cmd_len; size_t cmd_len;
1953 1955 char *expanded; char *expanded;
1954 1956 size_t x; size_t x;
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