summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-10-23 23:24:47 +0200
committerhut <hut@lavabit.com>2010-10-23 23:24:47 +0200
commit4d49588e4c4d34f7fcdf765fe86274757674f1a1 (patch)
tree1f6f002e7b184566e7101a2036fc809f62c3a109
parent0a11320336829b876da5cb52c6b1e286681360d0 (diff)
downloadranger-4d49588e4c4d34f7fcdf765fe86274757674f1a1.tar.gz
defaults.keys: added yp, yn, yd shortcuts + doc
-rw-r--r--ranger/defaults/keys.py3
-rw-r--r--ranger/help/movement.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index c31cee62..782af310 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -170,6 +170,9 @@ map('u<C-V><dir>', fm.mark_in_direction(val=False))
 map('yy', 'y<dir>', fm.copy())
 map('ya', fm.copy(mode='add'))
 map('yr', fm.copy(mode='remove'))
+map('yp', fm.execute_console('shell -d echo -n %d/%f | xsel -i'))
+map('yd', fm.execute_console('shell -d echo -n %d | xsel -i'))
+map('yn', fm.execute_console('shell -d echo -n %f | xsel -i'))
 map('dd', 'd<dir>', fm.cut())
 map('da', fm.cut(mode='add'))
 map('dr', fm.cut(mode='remove'))
diff --git a/ranger/help/movement.py b/ranger/help/movement.py
index 564b226b..fce01183 100644
--- a/ranger/help/movement.py
+++ b/ranger/help/movement.py
@@ -200,6 +200,9 @@ Clicking into the preview window will usually run the file. |2?|
 	cw	Open the console with ":rename "
 	A	Open the console with ":rename <current filename>"
 	I	Same as A, put the cursor at the beginning of the filename
+	yp	Copy the path of the file (with xsel)
+	yn	Copy the base name of the file (with xsel)
+	yd	Copy the directory name of the file (with xsel)
 
 
 ==============================================================================