As in the equivalent of mkdir dir1 dir2 when running in bash. This creates two separate directories, dir1 and dir2.

If you run :mkdir dir1 dir2 in ranger, it simply creates a directory called 'dir1 dir2'.


By default, ranger doesn't use mkdir flags. (I tried to pass it, and it doesn't work.)

But ranger provides the use of alias.

alias [newcommand] [oldcommand]
         Copies the oldcommand as newcommand.

So when you launch ranger you can set one to execute mkdir with the flags you need.

:alias mkdir shell mkdir -p

And then you can do:

:mkdir dir1 dir2 dir3 

Stemming off of tntx's answer above, adding

alias mkdir shell mkdir -p

to my rc.conf works exactly as expected. This is preferred as it will automatically be loaded into ranger on startup

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.