mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 11:31:15 -03:00
Fix umask function regex
Some grep implementations complain of empty subexpression fixes #1313
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user