about summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
authorXuehaiPan <XuehaiPan@pku.edu.cn>2021-08-22 14:11:13 +0800
committerXuehaiPan <XuehaiPan@pku.edu.cn>2021-08-22 14:11:13 +0800
commit1f35e8fa0da5bf29ca92a0eba25d2f8862bbd1a4 (patch)
tree28ed3df20bcdfb25c83b8e4a0584fa6636ffac71 /examples
parent01d83e95defb5532f98ba325170a4d1c92fede80 (diff)
downloadranger-1f35e8fa0da5bf29ca92a0eba25d2f8862bbd1a4.tar.gz
Use || operator for commands
Diffstat (limited to 'examples')
-rw-r--r--examples/rc_emacs.conf4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rc_emacs.conf b/examples/rc_emacs.conf
index 00acba3e..5105211a 100644
--- a/examples/rc_emacs.conf
+++ b/examples/rc_emacs.conf
@@ -331,8 +331,8 @@ map <C-x>g? cd /usr/share/doc/ranger
 
 # External Programs
 map <C-x><C-f>  edit
-map <C-x>du shell -p du -d 1 -h
-map <C-x>dU shell -p du -d 1 -h | sort -rh
+map <C-x>du shell -p (du --max-depth=1 --human-readable --apparent-size || du -d 1 -h) 2>/dev/null
+map <C-x>dU shell -p (du --max-depth=1 --human-readable --apparent-size || du -d 1 -h) 2>/dev/null | sort -rh
 map <C-x>wp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b
 map <C-x>wd shell -f echo -n %d    | xsel -i; xsel -o | xsel -i -b
 map <C-x>wn shell -f echo -n %f    | xsel -i; xsel -o | xsel -i -b