diff options
-rw-r--r-- | ranger/defaults/keys.py | 4 | ||||
-rw-r--r-- | ranger/help/movement.py | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py index 1f42b6ee..0806a494 100644 --- a/ranger/defaults/keys.py +++ b/ranger/defaults/keys.py @@ -244,7 +244,9 @@ map('gh', fm.cd('~')) map('ge', fm.cd('/etc')) map('gu', fm.cd('/usr')) map('gd', fm.cd('/dev')) -map('gl', fm.cd('/lib')) +map('gl', lambda arg: arg.fm.cd(os.path.realpath(arg.fm.env.cwd.path))) +map('gL', lambda arg: arg.fm.cd( + os.path.dirname(os.path.realpath(arg.fm.env.cf.path)))) map('go', fm.cd('/opt')) map('gv', fm.cd('/var')) map('gr', 'g/', fm.cd('/')) diff --git a/ranger/help/movement.py b/ranger/help/movement.py index 3abec359..564b226b 100644 --- a/ranger/help/movement.py +++ b/ranger/help/movement.py @@ -74,6 +74,9 @@ This keys can be used to make movements beyond the current directory { traverse in the other direction. (not implemented yet, currently this only moves back in history) + gl move to the real path of the current directory (resolving symlinks) + gL move to the real path of the selected file or directory + ============================================================================== 1.2. Browser control |