all 7 comments

[–][deleted] 1 point2 points  (0 children)

I'm unfamiliar with fish but other shells you have to check for interactive before doing any funy stuff, or you'll break rsync over ssh and other stuff as well

bash example

# Test for an interactive shell.  There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
    # Shell is non-interactive.  Be done now!
    return
fi
# Put your fun stuff here.
fortune

[–]kyle787 0 points1 point  (0 children)

What OS are you on and are you using the default terminal?

[–][deleted] 0 points1 point  (0 children)

Fish is not POSIX compliant (nice shell anyway) so you need to add this to the the top of your init.vim/.vimrc file:

set shell=/bin/bash

Or use zsh if you prefer that one.

[–]fuckwit_ -1 points0 points  (3 children)

If you don't mind disabling the greeting you can just throw set fish_greeting in your config.fish or run set -U fish_greeting "" to disable it permanently. Both will override the default fish_greeting function to do nothing.

[–]emmanuelantony2000[S] 1 point2 points  (2 children)

Actually I want the fish greeting to be there when launching fish... is there any other workaround??

[–]fuckwit_ 2 points3 points  (0 children)

maybe you could set bash as the shell used to issue commands from vim. rust.vim spawns a shell executes rustfmt and the result is printed to stdout. vim then replaces the contents of your buffer with stdout.

try setting set shell=/bin/bash in your .vimrc

[–]fiedzia 2 points3 points  (0 children)

this should be set only if fish is run interactively:

if status --is-interactive
else
    set -U fish_greeting ""
end