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 0b51292f3858d97445ac72a3456bf51fa6d8445e

Fix extending second :tr argument
It could cause failure in build with assertions.

Thanks to octos.

See http://q2a.vifm.info/107/santize-directory-names?show=110#a110
Author: xaizek
Author date (UTC): 2016-01-14 14:49
Committer name: xaizek
Committer date (UTC): 2016-01-14 14:49
Parent(s): 034dc44fa97ba45bf20e8b971871609b14c63ebc
Signing key:
Tree: a05837f8b0969aafeba13a4ddccb0d31f893915a
File Lines added Lines deleted
ChangeLog 3 0
THANKS 1 0
src/cmd_handlers.c 2 1
tests/misc/commands.c 22 0
File ChangeLog changed (mode: 100644) (index c44bf68e0..99af3286b)
45 45 Fixed parsing of commands which names are not followed by spaces with Fixed parsing of commands which names are not followed by spaces with
46 46 regard to pipe symbols (|). Thanks to aleksejrs. regard to pipe symbols (|). Thanks to aleksejrs.
47 47
48 Fixed extending second :tr argument, which could cause failure in build
49 with assertions. Thanks to octos.
50
48 51 0.8 to 0.8.1-beta 0.8 to 0.8.1-beta
49 52
50 53 Turned remote commands back on by default after their rewrite using Turned remote commands back on by default after their rewrite using
File THANKS changed (mode: 100644) (index 169b51494..7619a7401)
... ... Miles (pkordy)
76 76 Miodrag Tokić (loonies) Miodrag Tokić (loonies)
77 77 mvucBmM0 mvucBmM0
78 78 obtroston obtroston
79 octos
79 80 Oleg Gordienko (gordio) Oleg Gordienko (gordio)
80 81 Ondrej Novy (onovy) Ondrej Novy (onovy)
81 82 Pavel (neoascetic) Pavel (neoascetic)
File src/cmd_handlers.c changed (mode: 100644) (index 4cc584faa..14f3f1ed1)
... ... tr_cmd(const cmd_info_t *cmd_info)
3394 3394 while(sl < pl) while(sl < pl)
3395 3395 { {
3396 3396 buf[sl] = buf[sl - 1]; buf[sl] = buf[sl - 1];
3397 sl++;
3397 ++sl;
3398 3398 } }
3399 buf[sl] = '\0';
3399 3400 } }
3400 3401
3401 3402 mark_selected(curr_view); mark_selected(curr_view);
File tests/misc/commands.c changed (mode: 100644) (index da74befa8..7f0f9460d)
... ... TEST(user_command_is_executed_in_separated_scope)
287 287 assert_failure(exec_commands("cmd", &lwin, CIT_COMMAND)); assert_failure(exec_commands("cmd", &lwin, CIT_COMMAND));
288 288 } }
289 289
290 TEST(tr_extends_second_field)
291 {
292 assert_success(chdir(SANDBOX_PATH));
293
294 strcpy(lwin.curr_dir, SANDBOX_PATH);
295
296 create_file(SANDBOX_PATH "/a b");
297
298 lwin.list_rows = 1;
299 lwin.list_pos = 0;
300 lwin.dir_entry = dynarray_cextend(NULL,
301 lwin.list_rows*sizeof(*lwin.dir_entry));
302 lwin.dir_entry[0].name = strdup("a b");
303 lwin.dir_entry[0].origin = &lwin.curr_dir[0];
304 lwin.dir_entry[0].selected = 1;
305 lwin.selected_files = 1;
306
307 (void)exec_commands("tr/ ?<>\\\\:*|\"/_", &lwin, CIT_COMMAND);
308
309 assert_success(remove(SANDBOX_PATH "/a_b"));
310 }
311
290 312 /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */
291 313 /* vim: set cinoptions+=t0 filetype=c : */ /* vim: set cinoptions+=t0 filetype=c : */
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