Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorm32 <grzegorz.makarewicz@gmail.com>2021-04-11 17:39:04 +0300
committerm32 <grzegorz.makarewicz@gmail.com>2021-04-11 17:39:04 +0300
commit3427fd235cd6677db480ce4904c6ff9b12a9a530 (patch)
tree4475e74906c3d5f826f736bd6799cb634e61b79c /python/configs
parentfa38205511db6247f4010d0dd18b9ee641b1b37d (diff)
minor fixes
Diffstat (limited to 'python/configs')
-rw-r--r--python/configs/plug/far2l/pluginmanager.py5
-rw-r--r--python/configs/plug/plugins/read-en.txt6
-rw-r--r--python/configs/plug/plugins/udialog.py2
3 files changed, 7 insertions, 6 deletions
diff --git a/python/configs/plug/far2l/pluginmanager.py b/python/configs/plug/far2l/pluginmanager.py
index 1769ede3..e0797fbf 100644
--- a/python/configs/plug/far2l/pluginmanager.py
+++ b/python/configs/plug/far2l/pluginmanager.py
@@ -210,7 +210,8 @@ class PluginManager:
if OpenFrom == ffic.OPEN_COMMANDLINE:
line = ffi.string(ffi.cast("wchar_t *", Item))
log.debug("cmd:{0}".format(line))
- linesplit = line.split(' ')
+ line = line.lstrip()
+ linesplit = line.split(' ', 1)
if linesplit[0] == "unload":
if len(linesplit) > 1:
self.pluginRemove(linesplit[1])
@@ -224,7 +225,7 @@ class PluginManager:
else:
for plugin in self.plugins:
log.debug("{0} | {1}".format(plugin.Plugin.name, plugin.Plugin.label))
- if plugin.Plugin.HandleCommandLine(line) is True:
+ if plugin.Plugin.HandleCommandLine(linesplit[0]) is True:
plugin = plugin.Plugin(self, self.Info, ffi, ffic)
plugin.CommandLine(line)
break
diff --git a/python/configs/plug/plugins/read-en.txt b/python/configs/plug/plugins/read-en.txt
index 0e603a5c..88a20686 100644
--- a/python/configs/plug/plugins/read-en.txt
+++ b/python/configs/plug/plugins/read-en.txt
@@ -6,11 +6,11 @@ There is a logger.ini file in the Plugins/python/plug/far2l directory, you can s
By default, the log is saved to the file /tmp/far2l-py.
C. Fundamentals
-* .Py files from this directory should be copied to the directory:
+*.py files from this directory should be copied to the directory:
~/.config/far2l/plugins/python - The default directory for python plugins from which they can be easily activated.
-a) the plugins are loaded with the command "py: load filename" for example py: load ucharmap
-b) unloading the plugin is done with the command "py: unload filename" for example py: unload ucharmap
+a) the plugins are loaded with the command "py:load filename" for example py:load ucharmap
+b) unloading the plugin is done with the command "py:unload filename" for example py:unload ucharmap
D. Examples
a) ucharmap.py - an example plugin showing part of the UTF-8 character set
diff --git a/python/configs/plug/plugins/udialog.py b/python/configs/plug/plugins/udialog.py
index 9f6a1c28..c7822bc8 100644
--- a/python/configs/plug/plugins/udialog.py
+++ b/python/configs/plug/plugins/udialog.py
@@ -11,7 +11,7 @@ class Plugin(PluginBase):
@staticmethod
def HandleCommandLine(line):
- return line.split(' ', 1)[0] in ('dialog', 'exec')
+ return line in ('dialog', 'exec')
def CommandLine(self, line):
if line == 'dialog':