-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use PATH environment variable for Filtered View #59
Conversation
mc does not use the PATH environment variable to search for the executable when performing a Filtered View command. The filtered view command is run with the mc_popen function in lib/utilunix.c. This function runs the process with the glib function g_spawn_async_with_pipes, which by default requires the full path of the executable. This change adds the G_SPAWN_SEARCH_PATH flag to the g_spawn_async_with_pipes function call, which causes mc to use the PATH environment variable to search for the executable.
|
To replicate the problem:
Expected result: display output of grep command in mcview Reason: The grep command is not in the current directory, and the PATH environment variable is not used to search for the executable. |
|
Bug report: http://www.midnight-commander.org/ticket/3444 |
|
Applied as 544a6b6. |
|
Thanks for the commit :) |
|
do you know which release of MC contains or will contain the fix ? |
|
This issue seems to be back: when doing an F3 on a The script that was created as a result, as Its contents are these: #! /bin/sh
MC_EXT_FILENAME=/home/z/build/1packages/pacman-git/pacman-sync-first-option.patch
export MC_EXT_FILENAME
MC_EXT_BASENAME=pacman-sync-first-option.patch
export MC_EXT_BASENAME
MC_EXT_CURRENTDIR=/home/z/build/1packages/pacman-git
export MC_EXT_CURRENTDIR
MC_EXT_SELECTED="pacman-sync-first-option.patch"
export MC_EXT_SELECTED
MC_EXT_ONLYTAGGED=""
export MC_EXT_ONLYTAGGED
/usr/lib/mc/ext.d/misc.sh view catIt even works if I invoke it with empty Hmm, actually this happens for |
|
oh I see what's up... 5251045 G_SPAWN_SEARCH_PATH got removed ... EDIT4: ok ignoring all that, the actual error is: |
mc does not use the PATH environment variable to search for the executable when performing a Filtered View command.
The filtered view command is run with the mc_popen function in lib/utilunix.c. This function runs the process with the glib function g_spawn_async_with_pipes, which by default requires the full path of the executable.
This change adds the G_SPAWN_SEARCH_PATH flag to the g_spawn_async_with_pipes function call, which causes mc to use the PATH environment variable to search for the executable.