Ticket #3444 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Use PATH environment variable for Filtered View

Reported by: woodsb02 Owned by: andrew_b
Priority: major Milestone: 4.8.15
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

mc does not use the PATH environment variable to search for the executable when performing a Filtered View command.

To replicate the problem:

  1. In mc, open the "File" menu and select "Filtered View"
  2. In the displayed Filtered View command and arguments field, type "grep PATTERN FILENAME"

Expected result: display output of grep command in mcview
Actual result: Error is displayed "Cannot create pipe streams"

Reason: The grep command is not in the current directory, and the PATH environment variable is not used to search for the executable.

SYSTEM DETAILS:
$ uname -a
FreeBSD freenas 10.1-RELEASE-p9 FreeBSD 10.1-RELEASE-p9 #0: Tue Apr 7 01:09:46 UTC 2015 root@…:/usr/obj/usr/src/sys/GENERIC amd64

$ LC_MESSAGES=C mc -V
GNU Midnight Commander 4.8.14
Built with GLib 2.42.2
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

$ LC_MESSAGES=C mc -F
Root directory: /home/woodsb02

[System data]

Config directory: /usr/local/etc/mc/
Data directory: /usr/local/share/mc/
File extension handlers: /usr/local/libexec/mc/ext.d/
VFS plugins and scripts: /usr/local/libexec/mc/

extfs.d: /usr/local/libexec/mc/extfs.d/
fish: /usr/local/libexec/mc/fish/

[User data]

Config directory: /home/woodsb02/.config/mc/
Data directory: /home/woodsb02/.local/share/mc/

skins: /home/woodsb02/.local/share/mc/skins/
extfs.d: /home/woodsb02/.local/share/mc/extfs.d/
fish: /home/woodsb02/.local/share/mc/fish/
mcedit macros: /home/woodsb02/.local/share/mc/mc.macros
mcedit external macros: /home/woodsb02/.local/share/mc/mcedit/macros.d/macro.*

Cache directory: /home/woodsb02/.cache/mc/

$ mc --configure-options

'--with-internal-edit' '--enable-charset' '--enable-nls' '--enable-vfs-smb' '--with-smb-configdir=/usr/local/etc' '--with-smb-codepagedir=/usr/local/etc/codepages' '--with-subshell' '--enable-x' '--with-screen=slang' '--with-slang-includes=/usr/local/include' '--x-libraries=/usr/local/lib' '--x-includes=/usr/local/include' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=amd64-portbld-freebsd10.1' 'build_alias=amd64-portbld-freebsd10.1' 'CC=cc' 'CFLAGS=-O2 -pipe -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing' 'LDFLAGS= -L/usr/local/lib -fstack-protector' 'LIBS=' 'CPPFLAGS=-I/usr/local/include -DLIBICONV_PLUG' 'CPP=cpp' 'PKG_CONFIG=pkgconf'

Attachments

patch-lib_utilunix.c (538 bytes) - added by woodsb02 9 years ago.

Change History

Changed 9 years ago by woodsb02

comment:1 Changed 9 years ago by woodsb02

GitHub? pull request: https://github.com/MidnightCommander/mc/pull/59

Patch also attached.

comment:2 Changed 9 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.15

Branch: 3444_path_mc_popen
Initial changeset:ba9a5af10e89cc56a772ff7bfc1c692cea0dd0e6

comment:3 Changed 9 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from no branch to approved

comment:4 Changed 9 years ago by andrew_b

  • Votes for changeset changed from andrew_b to committed-master
  • Branch state changed from approved to merged

Merged to master: [544a6b625efa02edf788f2841cce63a9de071046].

git log --pretty=oneline 6c33f25..ba9a5af

comment:5 Changed 9 years ago by andrew_b

  • Status changed from accepted to testing
  • Resolution set to fixed

comment:6 Changed 9 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.