“rifle
is a powerful file executor that allows for complex file type checking, written to meet the needs of the file manager ranger
. rifle’s strength lies in automatically determining file types, depending on which programs are installed on the system, even without any user interaction.is a command like tool to manipulate (merge, extract, encrypt, etc) pdf files. (…) rifle shares configuration files with ranger, though ranger is not required in order to use rifle. The default configuration file rifle.conf is expected to be at ~/.config/ranger/rifle.conf.
” - source: man rifle
So I wanted to create a custom rifle menu for editing markdown files,
which is invoked by r
key in ranger. I have added the following lines
to rifle.conf
to launch either typora
or geany
.
# markdown files
ext md, has typora, X, flag f = typora -- "$@"
ext md, has geany, X, flag f = geany -- "$@"
After restarting ranger I got this rifle menu: