Create a gist now

Instantly share code, notes, and snippets.

@anekos / Secret
Created Sep 2, 2012

from ranger.api.commands import *
class mkseldir(Command):
:mkseldir <dirname>
Creates a directory with the name <dirname>, and select it.
def execute(self):
from os.path import join, expanduser, lexists
dirname = join(, expanduser(
if not lexists(dirname):
if lexists(dirname):
else:"Failed to mkdir!", bad=True)
else:"file/directory exists!", bad=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment