summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-04-26 17:02:48 +0200
committerAlan Pearce2017-04-26 17:02:48 +0200
commitb86646d0dd1be04afbfb96f4f2c0d5c2cceaa3c0 (patch)
tree703de0a3e8b9ffafe8206079c437da4f97325631
parentdfbb1bb931161ee1fdb8a8fdf14fb5e15c810787 (diff)
downloaddotfiles-b86646d0dd1be04afbfb96f4f2c0d5c2cceaa3c0.tar.lz
dotfiles-b86646d0dd1be04afbfb96f4f2c0d5c2cceaa3c0.tar.zst
dotfiles-b86646d0dd1be04afbfb96f4f2c0d5c2cceaa3c0.zip
zsh: Use gsort in place of sort, if necessary
-rw-r--r--zsh/.config/zsh/.zshrc4
1 files changed, 3 insertions, 1 deletions
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index 23f852e..6b62934 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/zsh/.config/zsh/.zshrc
@@ -108,8 +108,10 @@ bindkey '\e^b' backward-argument
 bindkey '\e^f' forward-argument
 bindkey '\e^k' kill-argument
 
+sort=${commands[gsort]:-$commands[sort]}
+
 ds () {
-  du -hd1 $1 | sort -h
+  du -hd1 $1 | $sort -h
 }
 
 # returns the first ghq root, whereas $GHQ_ROOT returns all