> On 01/08/12 06:19, eNG1Ne wrote:
>> I have three different machines with a score-writing package on, and
>> on two of the three I can run the "compile" equivalent to create
>> PostScript output with
>> !mup -F %
>>
>> On the third, I hit the following snag:
>>
>> !mup {fname} reports /bin/bash: mup: command not found
>>
>>> which mup reports "/usr/local/bin/mup-5.7/bin"
>> /usr/local/bin/mup-5.7/bin is the last entry in $PATH
>
> Strange: "which mup" should include mup at the end, something like
>
> /usr/local/bin/mup-5.7/bin/mup
>
> If that's the case, check what $PATH are set to in the shell and from
> within Vim. The same command works in both:
>
> bash$ echo $PATH
> :echo $PATH
>
> They *should* be the same, but perhaps for some reason it's getting
> tweaked before you go into vim.
Almost invariably, those two will be the same. (Unless you have some
kind of wrapper script to start Vim). The two to check are:
" from a shell
$ echo $PATH
" from within Vim, using a subshell (not the :echo command)
:!echo $PATH
An issue that came up recently on-list (don't recall whether it was this
list or the Zsh list):
Zsh has several different startup files, and only some of them are
sourced, depending on what mode the shell is in. If you modify your
PATH in .zshenv, it will affect all shells. In .zshprofile, it would
only affect login shells. And .zshrc only affects interactive shells.
I don't use Bash, but from the man page, it uses a similar convention:
.bash_profile affects all login shells and .bashrc only affects
interactive shells. There's no .bashenv by default, but setting the
BASH_ENV env var before starting up accomplishes the same thing.
The way Vim invokes a subshell, it starts non-interactively. So .zshrc
or .bashrc wouldn't be used. So, maybe you've done your PATH
modifications in a file that doesn't affect the subshell?
--
Best,
Ben
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment