[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nofork command substitution
From: |
Grisha Levit |
Subject: |
Re: nofork command substitution |
Date: |
Fri, 19 May 2023 16:59:49 -0400 |
This will be a very neat feature to have. One thing I'm excited about
is the ability to cleanly perform assignments during prompt expansion
(e.g. to capture information during PS0 or PS4 expansion).
Something I suspect people will complain about is that this change
makes some polyglot zsh/bash scripts that were previously
syntactically valid no longer so. A particularly prominent one is
git-completion.bash [1] distributed with git, which now reports syntax
errors when sourced due to the expansion on line 414:
413 if [[ -n ${ZSH_VERSION-} ]]; then
414 unset ${(M)${(k)parameters[@]}:#__gitcomp_builtin_*} 2>/dev/null
415 else
416 unset $(compgen -v __gitcomp_builtin_)
417 fi
Hopefully, there are not too many such scripts and they can just gain
some workarounds (like wrapping the zsh-only code in an eval).
[1]:
https://github.com/git/git/blob/v2.40.1/contrib/completion/git-completion.bash#L414
- Re: nofork command substitution, (continued)
Re: nofork command substitution, alex xmb ratchev, 2023/05/19
Re: nofork command substitution, Chet Ramey, 2023/05/19
Re: nofork command substitution,
Grisha Levit <=
Re: nofork command substitution, Koichi Murase, 2023/05/23
- Re: nofork command substitution, Chet Ramey, 2023/05/24
- Re: nofork command substitution, Robert Elz, 2023/05/25
- Re: nofork command substitution, Koichi Murase, 2023/05/25
- Re: nofork command substitution, Chet Ramey, 2023/05/25
- Re: nofork command substitution, Robert Elz, 2023/05/25
- Re: nofork command substitution, Chet Ramey, 2023/05/25
Re: nofork command substitution, Grisha Levit, 2023/05/23