aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-01-12 22:18:15 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-01-12 22:18:15 +0300
commit35d2432326505838c36b968e53dd67de85175788 (patch)
tree2046e70fa0dc7f7d00c49dbb66f8ea37a59c2782 /internal/p10k.zsh
parentcbb3f2bc4197df8bbaae75b304fbda3866d93eb8 (diff)
parse process substitutions
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh16
1 files changed, 11 insertions, 5 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 6c7be271..c4072d7a 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5477,10 +5477,16 @@ function _p9k_parse_buffer() {
(( ic )) && tokens[1,0]=(${(Z+C+)s}) || tokens[1,0]=(${(z)s})
done
- if [[ $token == '<<'(|-) ]]; then
- state=h
- continue
- fi
+ case $token in
+ '<<'(|-))
+ state=h
+ continue
+ ;;
+ '`'*'`'|'"`'*'`"'|'$('*')'|'"$('*')"'|['<>=']'('*')')
+ s=${${token##('"'|)(['$<>']|)?}%%?('"'|)}
+ (( ic )) && tokens+=(';' ${(Z+C+)s}) || tokens+=(';' ${(z)s})
+ ;;
+ esac
case $state in
*r)
@@ -5638,7 +5644,7 @@ function _p9k_parse_buffer() {
cmd+=$token$'\0'
else
state=t
- [[ $token == ('(('*'))'|'`'*'`'|'$'*|['<>']'('*')'|*$'\0'*) ]] || cmd+=$token$'\0'
+ [[ $token == ('(('*'))'|'`'*'`'|'$'*|['<>=']'('*')'|*$'\0'*) ]] || cmd+=$token$'\0'
fi
done
} always {