From d75dd6971ee8f67eebedfc797ae57154ae1ffb69 Mon Sep 17 00:00:00 2001 From: toonn Date: Sun, 5 Sep 2021 21:25:25 +0200 Subject: commands: Rename setlocal to setinpath The `setlocal` name is hard to remember, `setintag` is much easier to recall, so we will follow the same naming style. `setlocal` remains available as an alias for `setinpath`. A new abstract class, `_setlocal`, is introduced as a basis for the `setinpath` command because we want to reuse it for the original behavior of `setlocal`. Several bug fixes have been integrated in this new base class. The shifting of arguments was only incidentally correct most of the time. The matching of quoted arguments only worked in the absence of nested quotes. --- ranger/config/commands.py | 93 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 75 insertions(+), 18 deletions(-) (limited to 'ranger') diff --git a/ranger/config/commands.py b/ranger/config/commands.py index 1bd6f96f..5af41723 100755 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -482,36 +482,93 @@ class set_(Command): return None -class setlocal(set_): - """:setlocal path=