diff options
-rw-r--r-- | ranger/config/rc.conf | 1 | ||||
-rw-r--r-- | ranger/core/actions.py | 14 |
2 files changed, 7 insertions, 8 deletions
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf index de0b5043..f34b6e0c 100644 --- a/ranger/config/rc.conf +++ b/ranger/config/rc.conf @@ -490,6 +490,7 @@ cmap <end> eval fm.ui.console.move(right=-1, absolute=True) cmap <backspace> eval fm.ui.console.delete(-1) cmap <delete> eval fm.ui.console.delete(0) cmap <C-w> eval fm.ui.console.delete_word() +cmap <A-d> eval fm.ui.console.delete_word(backward=False) cmap <C-k> eval fm.ui.console.delete_rest(1) cmap <C-u> eval fm.ui.console.delete_rest(-1) cmap <C-y> eval fm.ui.console.paste() diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 58f7aa20..442182ff 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -160,7 +160,7 @@ class Actions(FileManagerAware, SettingsAware): def execute_console(self, string='', wildcards=[], quantifier=None): """Execute a command for the console""" - command_name = string.split()[0] + command_name = string.lstrip().split()[0] cmd_class = self.commands.get_command(command_name, abbrev=False) if cmd_class is None: self.notify("Command not found: `%s'" % command_name, bad=True) @@ -553,12 +553,6 @@ class Actions(FileManagerAware, SettingsAware): if func is not None: self.settings['sort'] = str(func) - def set_filter(self, fltr): - try: - self.thisdir.filter = fltr - except: - pass - def mark_files(self, all=False, toggle=False, val=None, movedown=None, narg=None): """A wrapper for the directory.mark_xyz functions. @@ -1258,7 +1252,11 @@ class Actions(FileManagerAware, SettingsAware): src = src.path try: - os.renames(src, dest) + os.makedirs(os.path.dirname(dest)) + except OSError: + pass + try: + os.rename(src, dest) except OSError as err: self.notify(err) return False |