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 a6b7761c51aa3567e7ae5ab27a3e89d18e1772c4

Fix extending filetypes missing macro on Win&cmd
Fixes #41.

Thanks to Daniel Polanco, a.k.a. dlpolanco.
Author: xaizek
Author date (UTC): 2014-04-21 10:48
Committer name: xaizek
Committer date (UTC): 2014-04-21 10:48
Parent(s): e83d4b34da8ea3b695c91ea6332c35f048904868
Signing key:
Tree: 4049b7c42293c779a948ec409b07659df61df443
File Lines added Lines deleted
ChangeLog 3 0
THANKS 1 0
data/vifm.1 6 5
data/vim/doc/vifm.txt 6 5
src/running.c 18 3
src/utils/utils.c 1 2
src/utils/utils.h 2 1
File ChangeLog changed (mode: 100644) (index 50e3be939..9c889ad4c)
169 169 Fixed updating terminal title for some environments. Thanks to Fixed updating terminal title for some environments. Thanks to
170 170 filterfalse. filterfalse.
171 171
172 Fixed extending filetypes that are missing macro on Windows when cmd shell
173 is used. Thanks to Daniel Polanco, a.k.a. dlpolanco.
174
172 175 0.7.6-beta2 to 0.7.6 0.7.6-beta2 to 0.7.6
173 176
174 177 Removed check for stdscr from the configure. Thanks to jtbm37. Removed check for stdscr from the configure. Thanks to jtbm37.
File THANKS changed (mode: 100644) (index 71f33b04f..a44db1bdf)
... ... Christoph (informationen)
14 14 ckester ckester
15 15 Daniel R. (r1chelt) Daniel R. (r1chelt)
16 16 Daniel Dettlaff (dmilith) Daniel Dettlaff (dmilith)
17 Daniel Polanco (dlpolanco)
17 18 Denis Protivenskiy Denis Protivenskiy
18 19 Florian Baumann (derflob) Florian Baumann (derflob)
19 20 greye greye
File data/vifm.1 changed (mode: 100644) (index ea01e4cef..1fdb2bb3f)
1 .TH vifm 1 "Apr 07, 2014" "" "Vifm"
1 .TH vifm 1 "Apr 21, 2014" "" "Vifm"
2 2 .\" --------------------------------------------------------------------------- .\" ---------------------------------------------------------------------------
3 3 .SH NAME .SH NAME
4 4 .\" --------------------------------------------------------------------------- .\" ---------------------------------------------------------------------------
 
... ... given to each command to ease understanding of what command will do in the
1332 1332 :file menu. Vifm will try the rest of the programs for an association when :file menu. Vifm will try the rest of the programs for an association when
1333 1333 the default isn't found. When program entry doesn't contain any of vifm the default isn't found. When program entry doesn't contain any of vifm
1334 1334 macros, name of current file is appended as if program entry ended with %c macros, name of current file is appended as if program entry ended with %c
1335 macro. On Windows path to executables containing spaces can (and should be
1336 for correct work with such paths) be double quoted. See "Globs" section
1337 below for pattern definition. See also "Automatic FUSE mounts" section
1338 below. Example for zip archives and several actions:
1335 macro on *nix and %"c on Windows. On Windows path to executables containing
1336 spaces can (and should be for correct work with such paths) be double quoted.
1337 See "Globs" section below for pattern definition. See also
1338 "Automatic FUSE mounts" section below. Example for zip archives and several
1339 actions:
1339 1340
1340 1341 .EE .EE
1341 1342 filetype *.zip,*.jar,*.war,*.ear filetype *.zip,*.jar,*.war,*.ear
File data/vim/doc/vifm.txt changed (mode: 100644) (index 36719c2fd..829acd7f4)
1 *vifm.txt* For Vifm version 0.7.6 Last change: 2014 Apr 07
1 *vifm.txt* For Vifm version 0.7.6 Last change: 2014 Apr 21
2 2
3 3 Email for bugs and suggestions: <xaizek@openmailbox.org> Email for bugs and suggestions: <xaizek@openmailbox.org>
4 4
 
... ... The builtin commands are:
1194 1194 command will do in the :file menu. Vifm will try the rest of the command will do in the :file menu. Vifm will try the rest of the
1195 1195 programs for an association when the default isn't found. When program programs for an association when the default isn't found. When program
1196 1196 entry doesn't contain any of vifm macros, name of current file is entry doesn't contain any of vifm macros, name of current file is
1197 appended as if program entry ended with %c macro. On Windows path to
1198 executables containing spaces can (and should be for correct work with
1199 such paths) be double quoted. See |vifm-globs| for pattern definition.
1200 See also |vifm-fuse|. Example for zip archives and several actions: >
1197 appended as if program entry ended with %c macro on *nix and %"c on
1198 Windows. On Windows path to executables containing spaces can (and
1199 should be for correct work with such paths) be double quoted. See
1200 |vifm-globs| for pattern definition. See also |vifm-fuse|. Example for
1201 zip archives and several actions: >
1201 1202
1202 1203 filetype *.zip,*.jar,*.war,*.ear filetype *.zip,*.jar,*.war,*.ear
1203 1204 \ {Mount with fuse-zip} \ {Mount with fuse-zip}
File src/running.c changed (mode: 100644) (index f071d9580..b19f5c6ab)
... ... run_using_prog(FileView *view, const char *program, int dont_execute,
601 601 else else
602 602 { {
603 603 char buf[NAME_MAX + 1 + NAME_MAX + 1]; char buf[NAME_MAX + 1 + NAME_MAX + 1];
604 char *temp = escape_filename(view->dir_entry[view->list_pos].name, 0);
604 const char *name_macro;
605 char *file_name;
605 606
606 snprintf(buf, sizeof(buf), "%s %s", program, temp);
607 #ifdef _WIN32
608 if(curr_stats.shell_type == ST_CMD)
609 {
610 name_macro = (view == curr_view) ? "%\"c" : "%\"C";
611 }
612 else
613 #endif
614 {
615 name_macro = (view == curr_view) ? "%c" : "%C";
616 }
617
618 file_name = expand_macros(name_macro, NULL, NULL, 1);
619
620 snprintf(buf, sizeof(buf), "%s %s", program, file_name);
607 621 shellout(buf, pause ? 1 : -1, 1); shellout(buf, pause ? 1 : -1, 1);
608 free(temp);
622
623 free(file_name);
609 624 } }
610 625 } }
611 626
File src/utils/utils.c changed (mode: 100644) (index e41dfbcac..3883ecf2c)
... ... get_regexp_error(int err, regex_t *re)
222 222 return buf; return buf;
223 223 } }
224 224
225 /* Returns pointer to a statically allocated buffer */
226 225 const char * const char *
227 enclose_in_dquotes(const char *str)
226 enclose_in_dquotes(const char str[])
228 227 { {
229 228 static char buf[PATH_MAX]; static char buf[PATH_MAX];
230 229 char *p; char *p;
File src/utils/utils.h changed (mode: 100644) (index 46f3eb51c..6720beb21)
... ... int is_on_slow_fs(const char full_path[]);
68 68 * Returns non-zero in case resulting string is a shortened variant of size. */ * Returns non-zero in case resulting string is a shortened variant of size. */
69 69 int friendly_size_notation(uint64_t num, int str_size, char *str); int friendly_size_notation(uint64_t num, int str_size, char *str);
70 70
71 const char * enclose_in_dquotes(const char *str);
71 /* Returns pointer to a statically allocated buffer. */
72 const char * enclose_in_dquotes(const char str[]);
72 73
73 74 /* Changes current working directory of the process. Does nothing if we already /* Changes current working directory of the process. Does nothing if we already
74 75 * at path. Returns zero on success, otherwise -1 is returned. */ * at path. Returns zero on success, otherwise -1 is returned. */
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