Skip to content

Comments

refactor!: simplify config to single --eval flag#104

Merged
maxim-uvarov merged 3 commits intomainfrom
config-api-eval
Jan 1, 2026
Merged

refactor!: simplify config to single --eval flag#104
maxim-uvarov merged 3 commits intomainfrom
config-api-eval

Conversation

@maxim-uvarov
Copy link
Member

Summary

  • Replace --config-path, --prepend-code, --table-width flags with single --eval flag
  • --eval accepts Nushell code directly; for file-based config use --eval (open -r config.nu)
  • Fix: preserve existing $env.numd fields when loading config (e.g., table-width set in env.nu)

Breaking Changes

# Before
numd run file.md --config-path config.nu --table-width 80

# After  
numd run file.md --eval (open -r config.nu)
numd run file.md --eval '$env.numd.table-width = 80'

Test plan

  • All tests pass

🤖 Generated with Claude Code

claude and others added 3 commits December 31, 2025 23:53
Previously load-config would overwrite $env.numd entirely, losing any
user-defined values (e.g., table-width set in env.nu). Now it merges
with existing values, only updating prepend-code and config-path when
they are explicitly provided.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace three configuration flags (--config-path, --prepend-code, --table-width)
with a single --eval flag that accepts Nushell code directly. For file-based
config, use `--eval (open -r config.nu)`.

This is a breaking API change that simplifies the interface while maintaining
all functionality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Regenerated intermediate scripts reflect the simplified --eval flag API.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@maxim-uvarov maxim-uvarov merged commit dc8f3c1 into main Jan 1, 2026
2 checks passed
@maxim-uvarov maxim-uvarov deleted the config-api-eval branch January 1, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants