summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-08-25 03:10:58 +0200
committerhut <hut@lavabit.com>2010-08-25 03:10:58 +0200
commit89f453db286f648dcaf498c32ac37d67ccd90e18 (patch)
treef94f669b0ab866d3fdf287eacc78ae5fcaec0244
parentfd51fa3da2848859ba722bac45178c24845d17d0 (diff)
downloadranger-89f453db286f648dcaf498c32ac37d67ccd90e18.tar.gz
defaults.keys: added keys gl and gL to resolve links
-rw-r--r--ranger/defaults/keys.py4
-rw-r--r--ranger/help/movement.py3
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