diff options
author | David Xia <david@davidxia.com> | 2014-07-29 01:43:05 -0400 |
---|---|---|
committer | David Xia <david@davidxia.com> | 2014-07-29 01:43:18 -0400 |
commit | 6d18bf5cd429b7afa834b0517b541ce487e171c5 (patch) | |
tree | 8704870b459224d70186ab76ff2c2123b03ada1d /share/functions/umask.fish | |
parent | adabc2d7a079739ef7bb9b9eb0e26f353378405a (diff) |
Fix umask function regex
Some grep implementations complain of empty subexpression
fixes #1313
Diffstat (limited to 'share/functions/umask.fish')
-rw-r--r-- | share/functions/umask.fish | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/functions/umask.fish b/share/functions/umask.fish index f65ca655..d68fb4dd 100644 --- a/share/functions/umask.fish +++ b/share/functions/umask.fish @@ -1,7 +1,7 @@ function __fish_umask_parse -d "Internal umask function" # Test if already a valid octal mask, and pad it with zeros - if echo $argv | sgrep -E '^(0|)[0-7]{1,3}$' >/dev/null + if echo $argv | sgrep -E '^0?[0-7]{1,3}$' >/dev/null set -l char_count (echo $argv| wc -c) for i in (seq (math 5 - $char_count)); set argv 0$argv; end echo $argv |