Within vim, I'd like to run one of my .bashrc functions, ocr, in background. I've tried the following commands in .vimrc, which do not work:
set shell=bash\ --login " to run bash aliases must use interactive shell
set shellcmdflag=-ic " to run bash aliases must use interactive shell
This ex command does work, but it won't run it in background:
:!bash -c -i ocr &
instead returning the message:
bash: initialize_job_control: no job control in background: Bad file descriptor
and the job is running in fg so that I cannot return to vim.