martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.21k stars 258 forks source link

How can I read bash functions from by .bashrc by using :set shell #947

Closed jgarte closed 9 months ago

jgarte commented 3 years ago

Hello,

How can I read bash functions from by .bashrc by using :set shell?

vis can't seem to find functions defined in my bashrc file.

It has no problem finding binaries installed by the nix package manager.

I'm using NixOS but I also tested this on void linux and I run into the same issue.

Any help with debugging this would be greatly appreciated.

ninewise commented 3 years ago

bash only sources your .bashrc when it's an interactive shell. You may want to try setting bash -i as your vis shell to force an interactive shell.

jgarte commented 3 years ago

bash only sources your .bashrc when it's an interactive shell. You may want to try setting bash -i as your vis shell to force an interactive shell.

@ninewise Thanks for the help.

This didn't work for me the last time I tried. Maybe I am still doing something wrong.

I ended up creating a bash script instead of using an alias and adding it to my PATH environment variable.

rnpnr commented 9 months ago

Since this seems like it was solved I will close it.