Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying new wt x-save foo for snippets with Canary but wt is pointing towards wt-stable #17875

Open
GitMurf opened this issue Sep 7, 2024 · 2 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@GitMurf
Copy link

GitMurf commented Sep 7, 2024

Windows Terminal version

1.23.2501.0

Windows build number

10.0.22635.0

Other Software

No response

Steps to reproduce

  • Open up WT Canary
  • Try to save a snippet with wt x-save git status
  • You get an error because wt is pointing to stable version which does not have this feature yet
  • I ran wt --version and saw that it was pointing to an older version (stable)

I eventually figured out I had to set my wt alias to Canary by stumbling upon this comment: #17463 (comment)

Here is what my alias settings were without me ever touching them. I had WT Stable installed obviously with windows, then installed WT Preview at one point and then recently installed WT Canary.

image

Expected Behavior

I am not sure. But at minimum this should be documented in the release notes and the original PR (since I looked there seeing if there was anything similar).

But ideally whatever terminal version you are in, I would expect / hope that wt would be "smart enough" to know to point to that specific terminal version (stable vs preview vs canary).

Actual Behavior

You get an error and unless you know about the wt alias needing to be set you will think it is just a bug with the new snippet x-save feature (or at least I did for a long while until I figured it out).

@GitMurf GitMurf added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Sep 7, 2024
@zadjii-msft
Copy link
Member

You're not the first person to give us this feedback, either. I don't know if there's anything we can secretly do smarter here.

  • I don't think we can resolve the wt.exe alias on our end, to check if it's not enabled for the version you're running.
  • I don't think in wt.exe itself we can check if wt is being launched from a different terminal package
  • I also don't want to muck with the PATH to try and like, insert our current wt into the path at the top, no matter what. Sounds like a recipe for pain (based on previous experience)

We can definitely leave a note in the --help text. That might be the best we can do for now


we may have also accidentally forgotten to enable that feature in Preview builds entirely 🤦

terminal/src/features.xml

Lines 158 to 167 in 544452d

<feature>
<name>Feature_SaveSnippet</name>
<description>Save Snippet</description>
<id>9971</id>
<stage>AlwaysDisabled</stage>
<alwaysEnabledBrandingTokens>
<brandingToken>Dev</brandingToken>
<brandingToken>Canary</brandingToken>
</alwaysEnabledBrandingTokens>
</feature>

@inoperable
Copy link

Just stop tormenting yourself with appx insanity and use the portable zip:

  • add a directory to your PATH environment variable,
  • put a .cmd file there that will launch the .exe file (use the same name)
  • then by typing wt (without extension) it will launch the .cmd first and the .cmd will launch your .exe

btw: windows does the same, but with some arcane ACLs "hardlinks" (?) in %APPDATA%\Microsoft\WindowsApps nobody understands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

3 participants