diff options
author | M Rawash <mrawash@gmail.com> | 2011-12-19 08:44:46 +0200 |
---|---|---|
committer | M Rawash <mrawash@gmail.com> | 2011-12-19 08:44:46 +0200 |
commit | fc17126a6a0ab436c757c545fa55e87ccd89635c (patch) | |
tree | 921fa891fa002c840d367e90f0f7693e05c42ea3 /ranger | |
parent | fcc47bf5261f328fb38c2df03f62c0847e562552 (diff) | |
download | ranger-fc17126a6a0ab436c757c545fa55e87ccd89635c.tar.gz |
core/runner.py: allow combination of 'r' and 'd' flags
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/runner.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/core/runner.py b/ranger/core/runner.py index 7d433652..baec1595 100644 --- a/ranger/core/runner.py +++ b/ranger/core/runner.py @@ -194,10 +194,11 @@ class Runner(object): if 'r' in context.flags: if 'sudo' not in get_executables(): return self._log("Can not run with 'r' flag, sudo is not installed!") + dflag = ('d' in context.flags) if isinstance(action, str): - action = 'sudo '+action + action = 'sudo ' + (dflag and '-b ' or '') + action else: - action = ['sudo']+action + action = ['sudo'] + (dflag and ['-b'] or []) + action toggle_ui = True context.wait = True if 't' in context.flags: |