GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Nushell 0.116: vp and vpr completion shows nothing when fish is not installed · Issue #3272 · voidzero-dev/vite-plus Closed Copy link Labels - P2: has workaroundAffects specific usage and has a straightforward workaround (priority)pending triagetriage: fix verified DescriptionDescribe the bugThe If the completer returns CauseThe 0.116 release notes describe the change in Unified custom completions. The change comes from nushell/nushell#18791.
The same section also says:
The list of behavior changes names
The 0.116.1 source agrees with the Book. See Proposed fixReturn def "nu-complete vp fish" [command: string] {
+ if (%which fish | %is-empty) { return null }
let fish_script = 'VP_COMPLETE=fish command vp | source; complete --do-complete=$argv[1]'The template is The guard checks only for a missing fish. I do not want to wrap the call in Reproductionhttps://github.com/voidzero-dev/vite-plus/blob/main/crates/vp_global_cli/src/commands/env/setup.rs Steps to reproduceYou do not need a project. The bug is in the generated In zsh: export VP_HOME=$(mktemp -d) vp env setup --refresh cd $VP_HOME nu -n In Nushell 0.116.1: version | get version # 0.116.1 $env.PATH = ($env.PATH | where { not ($in | path join fish | path exists) }) which fish # empty list source env.nu "vp " | commandline complete # ╭────────────╮ # │ empty list │ # ╰────────────╯ In an interactive session, These steps remove fish from To see the old behavior, do the same steps with Nushell 0.115.1. System Info$ vp env current Node.js: Version 22.23.4 Source .node-version Bin Path /Users/naokihaba/.vite-plus/js_runtime/node/22.23.4/bin/node Installed true Mode managed Package Manager: Name pnpm Version 12.11.2 Source packageManager Bin Paths pnpm /Users/naokihaba/.vite-plus/package_manager/pnpm/12.11.2/pnpm/bin/pnpm pnpx /Users/naokihaba/.vite-plus/package_manager/pnpm/12.11.2/pnpm/bin/pnpx Installed true Mode managed $ vp --version vp v1.4.0 Local vite-plus: vite-plus v1.4.0 Tools: vite v8.3.2 rolldown v1.2.12 vitest v5.0.3 oxfmt v0.71.0 oxlint v1.86.0 oxlint-tsgolint v7.0.2003 tsdown v0.23.0 Environment: Package manager pnpm v12.11.2 Node.js v22.23.4 (.node-version) Used Package Managerpnpm Logs### 1. Nushell 0.116.1, `env.nu`, fish on `PATH` ❯ cd $VP_HOME ❯ nu -n -c 'source env.nu; "vp " | commandline complete | length' 35 ### 2. Nushell 0.116.1, `env.nu`, without fish Non-interactive: ❯ nu -n -c 'source env.nu with-env { PATH: ($env.PATH | where { not ($in | path join fish | path exists) }) } { "vp " | commandline complete }' ╭────────────╮ │ empty list │ ╰────────────╯ Interactive. I pressed Tab after `vp env`, and Nushell showed nothing: ❯ PATH=$NOFISH_PATH ~/.local/share/mise/installs/nushell/0.116.1/*/nu -n /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.KNugJ9tOZ0> which fish ╭────────────╮ │ empty list │ ╰────────────╯ /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.KNugJ9tOZ0> source env.nu /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.KNugJ9tOZ0> vp env ### 3. Nushell 0.115.1, `env.nu`, without fish Non-interactive, in the first `VP_HOME`: ❯ ~/.local/share/mise/installs/nushell/0.115.1/*/nu -n -c 'source env.nu with-env { PATH: ($env.PATH | where { not ($in | path join fish | path exists) }) } { "vp " | commandline complete }' ╭───┬───────────────╮ │ 0 │ bin/ │ │ 1 │ cache/ │ │ 2 │ config.json │ │ 3 │ env │ │ 4 │ env.fish │ │ 5 │ env.nu │ │ 6 │ env.ps1 │ │ 7 │ fallback-bin/ │ │ 8 │ vp.ps1 │ ╰───┴───────────────╯ Interactive, in a second `VP_HOME`. That directory also has `js_runtime/`: ❯ ~/.local/share/mise/installs/nushell/0.115.1/*/nu -n /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.XPkZSjSPsm> version | get version 0.115.1 /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.XPkZSjSPsm> $env.PATH = ($env.PATH | where { not ($in | path join fish | path exists) }) /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.XPkZSjSPsm> which fish ╭────────────╮ │ empty list │ ╰────────────╯ /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.XPkZSjSPsm> source env.nu /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.XPkZSjSPsm> "vp " | commandline complete ╭───┬───────────────╮ │ 0 │ bin/ │ │ 1 │ cache/ │ │ 2 │ config.json │ │ 3 │ env │ │ 4 │ env.fish │ │ 5 │ env.nu │ │ 6 │ env.ps1 │ │ 7 │ fallback-bin/ │ │ 8 │ js_runtime/ │ │ 9 │ vp.ps1 │ ╰───┴───────────────╯ ### 4. Nushell 0.116.1, `env-a.nu` with the proposed fix, without fish ❯ cp env.nu env-a.nu # I added the guard line to env-a.nu. ❯ diff env.nu env-a.nu 52a53 > if (%which fish | %is-empty) { return null } ❯ nu -n /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.XPkZSjSPsm> version | get version 0.116.1 /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.XPkZSjSPsm> $env.PATH = ($env.PATH | where { not ($in | path join fish | path exists) }) /private/var/folders/zv/2c__5lqn00j_j14pxlf6zm_h0000gn/T/tmp.XPkZSjSPsm> source env-a.nu "vp " | commandline complete ╭────┬───────────────╮ │ 0 │ bin/ │ │ 1 │ cache/ │ │ 2 │ config.json │ │ 3 │ env │ │ 4 │ env-a.nu │ │ 5 │ env.fish │ │ 6 │ env.nu │ │ 7 │ env.ps1 │ │ 8 │ fallback-bin/ │ │ 9 │ js_runtime/ │ │ 10 │ vp.ps1 │ ╰────┴───────────────╯ Validations
Activity
MetadataMetadataAssigneesLabels- P2: has workaroundAffects specific usage and has a straightforward workaround (priority)pending triagetriage: fix verified TypeFieldsPriority None yet Effort None yet Target date None yet Start date None yet ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |