Skip to main content

Timeline for Call custom bash function from Vim

Current License: CC BY-SA 4.0

7 events
when toggle format what by license comment
Apr 5, 2022 at 6:24 comment added Christian Brabandt Are you sure? That's against the documented behaviour for at least bash. In any case, I would use :set verbose=5 then run a custom command like :!true and observe the shell command that is being issued. From there you can further debug on how to source your functions (or add parameters to the 'shellcmdflag' and other related options
Apr 4, 2022 at 14:45 comment added D. Ben Knoble Why not create a script instead and place it somewhere in your PATH? Then calling it from any shell and from tools like Vim should just work
Apr 4, 2022 at 12:18 history edited Xxxo CC BY-SA 4.0
added 101 characters in body
Apr 4, 2022 at 12:17 comment added Xxxo In MacOS, the non-interactive shells run the /etc/basrhc or /etc/profile/. That is why I'm mentioning this.
Apr 4, 2022 at 11:48 comment added Christian Brabandt I am not sure I understand the questions. I believe the shell executed by vim is not an interactive shell, so it won't read bashrc files. You can change this by adding /ic to shellcmdflag option
Apr 4, 2022 at 7:55 history edited Xxxo CC BY-SA 4.0
added 24 characters in body
Apr 4, 2022 at 7:44 history asked Xxxo CC BY-SA 4.0