From d7051ccbacdb9e313df57d7de5db8ab875f189d9 Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 23 Aug 2011 01:01:50 +0200 Subject: defaults/keys: added hints for chmod keys --- ranger/defaults/keys.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py index 1f4c3332..44d5c0d9 100644 --- a/ranger/defaults/keys.py +++ b/ranger/defaults/keys.py @@ -201,6 +201,15 @@ for mode in product('ugoa', 'rwxXst'): map('+%s%s' % mode, fm.execute_console('shell chmod %s+%s %%s' % mode)) map('=%s%s' % mode, fm.execute_console('shell chmod %s+%s %%s' % mode)) +# hints: +template = '%s %s to *r*ead, *w*rite, e*x*ecute' +for who, name in zip('ugoa', ('user', 'group', 'others', 'all')): + map('-%s' % who, fm.hint(template % ('forbid', name))) + map('+%s' % who, fm.hint(template % ('allow', name))) + map('=%s' % who, fm.hint(template % ('allow', name))) +map('-', '+', '=', fm.hint('change permission for *u*ser, ' + '*g*roup, *o*thers, *a*ll')) + # ---------------------------------------------------- run programs map('S', fm.execute_command(os.environ['SHELL'])) map('E', fm.edit_file()) -- cgit 1.4.1-2-gfad0