mirror of
https://github.com/mikefarah/yq.git
synced 2026-03-10 15:54:26 +00:00
* feat: Add UnwrapScalar to ShellVariablesPreferences - Add UnwrapScalar boolean field to ShellVariablesPreferences struct. - Initialize UnwrapScalar to false in NewDefaultShellVariablesPreferences. - This preference will control whether shell output should be quoted or raw. * feat: Propagate unwrapScalar to ShellVariablesPreferences - In configureEncoder function, set UnwrapScalar in ConfiguredShellVariablesPreferences. - This ensures the -r flag's state is passed to the shell encoder for raw output control. * feat: Implement conditional quoting in shellVariablesEncoder - Modify doEncode method to check pe.prefs.UnwrapScalar. - If UnwrapScalar is true, output raw node.Value. - Otherwise, use quoteValue for shell-safe quoting. - This enables quote-free output for Kubernetes workflows when -r is used. * test: Add tests for UnwrapScalar in shell encoder - Introduce assertEncodesToUnwrapped helper function. - Add TestShellVariablesEncoderUnwrapScalar to verify quote-free output with -r. - Add TestShellVariablesEncoderDefaultQuoting to confirm default quoting behavior without -r. - Ensure comprehensive testing of conditional quoting logic for shell output. * remove redundant test |
||
|---|---|---|
| .. | ||
| completion.go | ||
| constant.go | ||
| evaluate_all_command_test.go | ||
| evaluate_all_command.go | ||
| evaluate_sequence_command_test.go | ||
| evaluate_sequence_command.go | ||
| root_test.go | ||
| root.go | ||
| unwrap_flag.go | ||
| utils_test.go | ||
| utils.go | ||
| version_test.go | ||
| version.go | ||