add assignments name=value and unset
- name=value (one or more) without a command sets variables of the shell - name=value before a command sets them only in its environment (for builtins only while they run) - an assignment needs an unquoted name and =; the value is not split and not expanded as wildcard or brace pattern, ~ is expanded after = and : - the status of an assignment is the one of its last $(...) - new builtin unset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb94e98da5
commit
22ce8c00d4
5 files changed
+256
-14
No files matched your search
+1
-1
@@ -1674,7 +1674,7 @@ func TestTokenize_Operators(t *testing.T) {
|
||||
}
|
||||
// Patterns are tested in TestTokenize_Patterns
|
||||
for i := range got {
|
||||
got[i].pattern, got[i].glob = "", false
|
||||
got[i].pattern, got[i].glob, got[i].assign = "", false, false
|
||||
}
|
||||
if !reflect.DeepEqual(got, tc.want) {
|
||||
t.Errorf("tokenize(%q) = %+v, want %+v", tc.input, got, tc.want)
|
||||
|
||||
Reference in new issue
Block a user