summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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)
 
 
 ==============================================================================