diff options
author | hut <hut@lavabit.com> | 2011-10-08 19:33:22 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2011-10-08 19:33:22 +0200 |
commit | 027ded1507f17b3b8d732a1806d8fccec1aaf4ff (patch) | |
tree | 2d0fdf62b3dd2e3a01f8c6fe2ed3b95aebd1aed3 /ranger/core/actions.py | |
parent | 7dc8fef89688b92ff03ec8005e57286751d0c539 (diff) | |
download | ranger-027ded1507f17b3b8d732a1806d8fccec1aaf4ff.tar.gz |
defaults/apps: moved file chooser code to Actions.execute_file
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r-- | ranger/core/actions.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 9f7321be..b382a684 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -222,6 +222,11 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): mode is a positive integer. Both flags and mode specify how the program is run.""" + # ranger can act as a file chooser when running with --choosefile=... + if ranger.arg.choosefile: + open(ranger.arg.choosefile, 'w').write(self.fm.env.cf.path) + raise SystemExit() + if isinstance(files, set): files = list(files) elif type(files) not in (list, tuple): |