Script_running_in_bash
Not sure what’s the best method is to determine if a script is running under bash or if it’s vim (for example) that is the caller.
The reason is: I have F9 bound to run my ruby scripts from inside vim/nvim (or nvchad). Some things are not great running inside an editor (or the limited terminal they provide).. say ncurses for example.
name = `ps -p #{Process::ppid} -o fname=`.chomp
# or $PPID (ENV)
# from inside nvchad, name is 'nvim'
# from terminal, name is 'bash'