voldikss / vim-floaterm

:computer: Terminal manager for (neo)vim
MIT License
2.47k stars 78 forks source link

Feature ask: use self defined function in new term #377

Open QiangZiBro opened 1 year ago

QiangZiBro commented 1 year ago

Hi, I'm using zsh, suppose I defined a function in ~/.zshrc:

hello(){
  echo "hello"
}

Is it possible to use it with FloatermNew directly:

exec 'FloatermNew hello`

not source the ~/.zshrc and then use it?

exec 'FloatermNew source ~/.zshrc && hello`

I noticed that exported variables could be sustained in new terminal but not function, how can we solve it?