I have this alias in my .zshrc:alias grim='gvim --remote'But this is not seen from ranger file manager, I believe that ranger runs a 'generic' shell skipping my .zshrc. I want to make this alias visible in every shell.I added it to ~/.profile and to /etc/zsh/zshrc but no effect. To be specific a got this message:/bin/sh: grim: not found
How to add system alias?
shell;alias
Only interactive shells read a file that may contain alias definitions. If you want to use a nickname for a command in shell snippets executed by applications, an alias is not the right tool. Instead, write a wrapper script like this:#!/bin/shgvim --remote $@Call it ~/bin/grim and make it executable. Make sure you have ~/bin in your PATH (you can put the script in any other directory that's in your PATH).If you want it to work for every user on the system, put it in /usr/local/bin instead, ensuring that that directory is in everyone's PATH.