diff options
author | Leo Vivier <zaephon@gmail.com> | 2019-02-10 15:55:58 +0100 |
---|---|---|
committer | Leo Vivier <zaephon@gmail.com> | 2019-02-10 16:08:18 +0100 |
commit | bd7361adbade8a532fbb12b9b4333a77c8c67453 (patch) | |
tree | 7ad3085dd312b0e18d20a26414954a34d842e0c3 | |
parent | 3963d9b8d56e39ff97b957ad58587bb562bdbe60 (diff) | |
download | ranger-bd7361adbade8a532fbb12b9b4333a77c8c67453.tar.gz |
rename_append: Use `rename` if point is on a directory
When the directory at point has full-stops in it, rename_append would put the point at the last period in the dir-name, as it would with a file.
-rwxr-xr-x | ranger/config/commands.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index d177203a..93da7fe2 100755 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -1000,6 +1000,10 @@ class rename_append(Command): self.fm.open_console('rename ' + relpath) return + if os.path.isdir(relpath): + self.fm.open_console('rename ' + relpath) + return + if self._flag_ext_all: pos_ext = re.search(r'[^.]+', basename).end(0) else: |