Skip to main content
edited tags
Source Link
Martin Tournoij
  • 63.3k
  • 26
  • 199
  • 274

I recently switched to macvim, Everything work perfectly apart from the :shell or :sh. Shell have:shell command, which produces weird output, I tried few solutions but noting seems to me working out.

:shell

\n\w\n\u $ [72004h

Solutions that I already tried. I add this to my .zshrc.

1:

if [ $TERM == 'dumb' ];
  then
   echo 'frrank MacVim'
fi

2:

if [ $TERM == 'dumb' ];
  then
   # no colors
   export PS1="\n\w\n\u $ "
else
   # colors
   export PS1="\n\[\033[32m\]\w\n\[\033[1;31m\]\[\033[1;36m\]\u\[\033[0m\] $ \[\033[0m\]"
fi

I recently switched to macvim, Everything work perfectly apart from the :shell or :sh. Shell have weird output, I tried few solutions but noting seems to me working out.

:shell

\n\w\n\u $ [72004h

Solutions that I already tried. I add this to my .zshrc.

1:

if [ $TERM == 'dumb' ];
  then
   echo 'frrank MacVim'
fi

2:

if [ $TERM == 'dumb' ];
  then
  # no colors
   export PS1="\n\w\n\u $ "
else
  # colors
   export PS1="\n\[\033[32m\]\w\n\[\033[1;31m\]\[\033[1;36m\]\u\[\033[0m\] $ \[\033[0m\]"
fi

I recently switched to macvim, Everything work perfectly apart from the :shell command, which produces weird output, I tried few solutions but noting seems to me working out.

:shell

\n\w\n\u $ [72004h

Solutions that I already tried. I add this to my .zshrc.

1:

if [ $TERM == 'dumb' ]; then
   echo 'frrank MacVim'
fi

2:

if [ $TERM == 'dumb' ]; then
   # no colors
   export PS1="\n\w\n\u $ "
else
   # colors
   export PS1="\n\[\033[32m\]\w\n\[\033[1;31m\]\[\033[1;36m\]\u\[\033[0m\] $ \[\033[0m\]"
fi
Source Link
farhan
  • 113
  • 6

Macvim shell command not working as expected

I recently switched to macvim, Everything work perfectly apart from the :shell or :sh. Shell have weird output, I tried few solutions but noting seems to me working out.

:shell

\n\w\n\u $ [72004h

Solutions that I already tried. I add this to my .zshrc.

1:

if [ $TERM == 'dumb' ];
  then
   echo 'frrank MacVim'
fi

2:

if [ $TERM == 'dumb' ];
  then
  # no colors
   export PS1="\n\w\n\u $ "
else
  # colors
   export PS1="\n\[\033[32m\]\w\n\[\033[1;31m\]\[\033[1;36m\]\u\[\033[0m\] $ \[\033[0m\]"
fi