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 919ccc18cbb53a1699a9761d18bc562b2c60a038

Small corrections for :mkdir command
Don't go to directory on error when it already exist.
Print message about how many directories were created.
Author: xaizek
Author date (UTC): 2011-11-13 18:52
Committer name: xaizek
Committer date (UTC): 2011-11-13 18:52
Parent(s): 0a32efb1236a80bb05790f059a4ae3e7fdd0605e
Signing key:
Tree: 11e538e39b3cf13821e41ca6632dc0e6c2279da8
File Lines added Lines deleted
src/commands.c 1 1
src/fileops.c 15 1
File src/commands.c changed (mode: 100644) (index 66736e67a..18b09ddb8)
... ... static int
3920 3920 mkdir_cmd(const cmd_info_t *cmd_info) mkdir_cmd(const cmd_info_t *cmd_info)
3921 3921 { {
3922 3922 make_dirs(curr_view, cmd_info->argv, cmd_info->argc, cmd_info->emark); make_dirs(curr_view, cmd_info->argv, cmd_info->argc, cmd_info->emark);
3923 return 0;
3923 return 1;
3924 3924 } }
3925 3925
3926 3926 static int static int
File src/fileops.c changed (mode: 100644) (index 8992eb9c5..4ec37773c)
... ... make_dirs(FileView *view, char **names, int count, int create_parent)
3566 3566 { {
3567 3567 char buf[COMMAND_GROUP_INFO_LEN + 1]; char buf[COMMAND_GROUP_INFO_LEN + 1];
3568 3568 int i; int i;
3569 int n;
3569 3570 void *cp = (void *)(long)create_parent; void *cp = (void *)(long)create_parent;
3570 3571
3571 3572 snprintf(buf, sizeof(buf), "mkdir in %s: ", snprintf(buf, sizeof(buf), "mkdir in %s: ",
 
... ... make_dirs(FileView *view, char **names, int count, int create_parent)
3573 3574
3574 3575 get_group_file_list(names, count, buf); get_group_file_list(names, count, buf);
3575 3576 cmd_group_begin(buf); cmd_group_begin(buf);
3577 n = 0;
3576 3578 for(i = 0; i < count; i++) for(i = 0; i < count; i++)
3577 3579 { {
3578 3580 char full[PATH_MAX]; char full[PATH_MAX];
3579 3581 snprintf(full, sizeof(full), "%s/%s", view->curr_dir, names[i]); snprintf(full, sizeof(full), "%s/%s", view->curr_dir, names[i]);
3580 3582 if(perform_operation(OP_MKDIR, cp, full, NULL) == 0) if(perform_operation(OP_MKDIR, cp, full, NULL) == 0)
3583 {
3581 3584 add_operation(OP_MKDIR, cp, NULL, full, ""); add_operation(OP_MKDIR, cp, NULL, full, "");
3585 n++;
3586 }
3587 else if(i == 0)
3588 {
3589 i--;
3590 names++;
3591 count--;
3592 }
3582 3593 } }
3583 3594 cmd_group_end(); cmd_group_end();
3584 3595
3585 go_to_first_file(view, names, count);
3596 if(count > 0)
3597 go_to_first_file(view, names, count);
3598
3599 status_bar_messagef("%d directorie%s created", n, (n == 1) ? "" : "s");
3586 3600 } }
3587 3601
3588 3602 int int
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