diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-05 00:10:59 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-05 00:11:49 +1200 |
commit | 1879eebc785de78207dd83386028815b7b99ea18 (patch) | |
tree | 67653da81e884cc4200f87e8e074ee036ddf4999 /bin/dub | |
parent | Switch fnl()/scr() to use mktd(1) (diff) | |
download | dotfiles-1879eebc785de78207dd83386028815b7b99ea18.tar.gz dotfiles-1879eebc785de78207dd83386028815b7b99ea18.zip |
Handle different .* expansion in cf(1), dub(1)
OpenBSD seems to omit . and .. from its .* expansion (which actually
makes more sense to me), but Bash on Linux does not. This makes the
"shift 2" test more explicit.
Diffstat (limited to 'bin/dub')
-rwxr-xr-x | bin/dub | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -5,7 +5,9 @@ cd -- "$dir" || exit set -- * [ -e "$1" ] || shift set -- .* "$@" -shift 2 +[ -e "$1" ] || shift +[ "$1" = . ] && shift +[ "$1" = .. ] && shift du -ks -- "$@" | sort -k1nr | sed "$lines"q |