diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-07 14:46:38 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-07 14:46:38 +1300 |
commit | 926fa4e0a8047a874fb45943fbf17bcdde80e1cf (patch) | |
tree | 74b324a5bc6568ee62d8b2bb4571f69520192b63 /sh | |
parent | loc(1df) errors to stderr, exit (diff) | |
download | dotfiles-926fa4e0a8047a874fb45943fbf17bcdde80e1cf.tar.gz dotfiles-926fa4e0a8047a874fb45943fbf17bcdde80e1cf.zip |
Prevent getopts call in tree() panicking
Diffstat (limited to 'sh')
-rw-r--r-- | sh/shrc.d/tree.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sh/shrc.d/tree.sh b/sh/shrc.d/tree.sh index dd78f8ee..b4f91df8 100644 --- a/sh/shrc.d/tree.sh +++ b/sh/shrc.d/tree.sh @@ -7,7 +7,8 @@ tree() { if ( # Not if -n is in the arguments and -C isn't - while getopts 'nC' opt ; do + # Don't tell me about missing options, either + while getopts 'nC' opt 2>/dev/null ; do case $opt in n) n=1 ;; C) C=1 ;; |