id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
3914	%view not piping command output to internal viewer in user menu	marcelpaulo	andrew_b	"I'm running mc that I built from source on Xubuntu 18.04:

{{{
git clone https://github.com/MidnightCommander/mc
./autogen.sh
./configure
make
sudo make install
}}}

Here's my version info:

{{{
+paulo:~$ mc -V
GNU Midnight Commander 4.8.20-133-g35d21b6ea
Built with GLib 2.56.1
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
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
}}}

I make extensive use of macro `%view` in ''~/.config/menu'' to pipe the output of commands into the interval viewer. It worked correctly with the Ubuntu-packaged mc version '''4.8.19'''. With my current version ('''4.8.20-133-g35d21b6ea'''), it shows on the internal viewer the script that the menu entry generated. It doesn't matter what shell commands the menu entry has: if it contains a single %view macro, activating the menu causes the script to be shown on the internal viewer.

It's very easy to reproduce:

1.  Create ''~/.config/menu'' with a single entry:

    {{{
    x   foo
        %view date
    }}}

2.  Press F2 to open the user menu, then press '''x'''

3.  Instead of showing the output of command `date`, this is shown on the interal viewer:

    {{{
    #! /bin/sh
     date
    }}}

Strangely, the macro `%view` works as expected in `~/.config/mc/mc.ext`. It just stopped working in the user menu."	defect	closed	major	4.8.21	mc-core	master	fixed					approved	committed-master
