On Wed, Jun 08, 2016 at 11:00:21PM +0200, Rafael Sadowski wrote: > On Wed Jun 08, 2016 at 09:34:50PM +0200, Landry Breuil wrote: > > On Tue, Jun 07, 2016 at 09:28:37PM +0200, Rafael Sadowski wrote: > > > Hi ports@ and vifm friends, > > > > > > here is a third and last try to push vifm in ports tree. > > > > > > port core features: > > > - The same as: http://marc.info/?l=openbsd-ports&m=145647165914163&w=2 > > > - new: remove popen(2) call and replace with fork(2)(execl(3) > > > > > > pkg/DESCR: > > > > > > Vifm is a two panel ncurses based vi[m] like file manager. If you use vi, > > > vifm gives you complete keyboard control over your files without having > > > to learn a new set of commands. It goes not just about vi[m] like > > > keybindings, but also about modes, options, registers, commands and > > > other things you might already like in vi[m]. > > > > > > OK, Comments? > > > > Has all the failure/risky cases that were reported in the last thread > > tested/taken care of now ? > > > > Landry > > Of course, I fixed all failure/risky cases and yes I tested it well. I > would have thought that was patently obvious. I'll send fork/execl > replacement patch upstream.
Here's a slightly modified version of your patch to fix warnings:
/usr/obj/tmpfs/ports/vifm-0.8.1a/vifm-0.8.1a/src/int/file_magic.c:181: warning:
missing sentinel in function call
/usr/obj/tmpfs/ports/vifm-0.8.1a/vifm-0.8.1a/src/int/file_magic.c:182: warning:
implicit declaration of function 'exit'
/usr/obj/tmpfs/ports/vifm-0.8.1a/vifm-0.8.1a/src/int/file_magic.c:182: warning:
incompatible implicit declaration of built-in function 'exit'
- include stdlib.h for exit()
- remove unused char command declaration
- add NULL sentinel as last arg of execl()
I've tested it a bit, with a file named "echo 'foo' > bar" in /tmp, no
ill effect. But that was with the default gtk backend, and it allows me
to open the file in mousepad fine.
With the no_x11 FLAVOR, it 'does the right thing' afaict.
30832 vifm ARGS
[0] = "file"
[1] = "-b"
[2] = "--mime-type"
[3] = "/tmp/echo \\'foo\\' > bar"
And via enter, opens the file in vim.
61442 vifm ARGS
[0] = "/bin/ksh"
[1] = "-c"
[2] = "vim /tmp/echo\\ \\'foo\\'\\ \\>\\ bar"
66333 ksh ARGS
[0] = "vim"
[1] = "/tmp/echo 'foo' > bar"
Tested slightly with jpg and mp4 files, mimetype seems correctly found,
i still have 'less' options to open the file than with the default
flavor (check :f) but that's expected.
So, fwiw, the attached version is ok for me to import - stuff can still
be fixed in-tree if more issues arise. Let's stop the bikeshedding, and
thank Rafael for his perseverance.
Landry
vifm2.tgz
Description: application/tar-gz
