mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
Fix umask function regex
Some grep implementations complain of empty subexpression fixes #1313
This commit is contained in:
parent
adabc2d7a0
commit
6d18bf5cd4
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue