Skip to content

changed deprecated flag for updated version - #651

Merged
aooohan merged 1 commit into
version-fox:mainfrom
allymander:fix-deprecated-nushell-flag
Apr 15, 2026
Merged

aooohan merged 1 commit into
version-fox:mainfrom
allymander:fix-deprecated-nushell-flag

Conversation

@allymander

Copy link
Copy Markdown
Contributor

Issue

Current autogenerated config for nushell produces this warning on load:

Warning: nu::parser::deprecated

  ⚠ Flag deprecated.
    ╭─[/home/jay/.config/nushell/vfox.nu:21:43]
 20 │   $env.config = ($env.config | upsert hooks.pre_prompt {
 21 │     let currentValue = ($env.config | get -i hooks.pre_prompt)
    ·                                           ─┬
    ·                                            ╰── get --ignore-errors was deprecated in 0.106.0 and will be removed in a future release.
 22 │     if $currentValue == null {
    ╰────
  help: This flag has been renamed to `--optional (-o)` to better reflect its behavior.

Changes

Updated config generation script to use the appropriate flag

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the autogenerated Nushell activation script to avoid a deprecation warning by switching from the deprecated get --ignore-errors (-i) flag to the renamed get --optional (-o) flag.

Changes:

  • Update Nushell hooks.pre_prompt config lookup to use get -o instead of get -i.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/shell/nushell.go
Comment on lines 43 to 45
$env.config = ($env.config | upsert hooks.pre_prompt {
let currentValue = ($env.config | get -i hooks.pre_prompt)
let currentValue = ($env.config | get -o hooks.pre_prompt)
if $currentValue == null {

Copilot AI Apr 11, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The activation template now uses get -o here, but internal/shell/nushell_test.go (TestNushellActivateWithPidCheck) currently asserts that get -i is present and that get -o is absent. This will cause the existing unit test suite to fail once this change lands; update the test expectations (and its comment) to match the new flag.

Copilot uses AI. Check for mistakes.
@aooohan
aooohan merged commit 359d3c7 into version-fox:main Apr 15, 2026
4 checks passed
@allymander
allymander deleted the fix-deprecated-nushell-flag branch May 2, 2026 19:18
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.

3 participants