diff options
author | hut <hut@lavabit.com> | 2011-09-24 00:13:59 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-09-24 00:13:59 +0200 |
commit | f491d57798601093c1ee353aa9943e995a1e5648 (patch) | |
tree | 992750ca3e930ca2721763075175ab64a496121b /ranger/core/actions.py | |
parent | 01f0ff6016f71dade2ad8a538060e66c5ef7ae12 (diff) | |
download | ranger-f491d57798601093c1ee353aa9943e995a1e5648.tar.gz |
core.actions: Added flag "c" + documentation
The "c" flag allows you to run the current file even though other files are marked. Will only work when using fm.execute_file.
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r-- | ranger/core/actions.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index d77f2a86..c8dffa55 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -163,6 +163,13 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): elif type(files) not in (list, tuple): files = [files] + if 'flags' in kw: + from ranger.core.runner import Context + context = Context(files=list(files), flags=kw['flags']) + context.squash_flags() + if 'c' in context.flags: + files = [self.fm.env.cf] + self.signal_emit('execute.before', keywords=kw) try: return self.run(files=list(files), **kw) |