Skip to content

Handle fish ghost text suggestions in the prompt input model #233799

Closed

Description

We need to adjust for ghost text, that's why it's not working ATM.

case 'fish': {
// TODO: ghost text in the command line prevents
// completions from working ATM for fish
const fishOutput = execSync('functions -n', options);
const fishResult = fishOutput.split(', ').filter(cmd => cmd);
if (fishResult.length) {
cachedBuiltinCommands?.set(shellType, fishResult);
return fishResult;
}
break;
}

Activity

  1. added
    feature-request
    and removed
    feature-request
    on Nov 13, 2024
  2. added
    feature-request
    on Nov 13, 2024
  3. removed their assignment
    on Dec 9, 2024
  4. changed the title [-]Support fish completions[/-] [+]Handle fish ghost text suggestions in the prompt input model[/+] on Feb 3, 2025
  5. Tyriar commented on Feb 3, 2025

    @Tyriar
    Contributor

    The completions are working for me I think. It just falls over when ghost text is around as we don't detect it like with pwsh:

    Image

    I don't expect this to be too difficult, just enabling the pwsh logic stuff in fish (if that's how it works).

  6. Tyriar commented on Feb 3, 2025

    @Tyriar
    Contributor

    Investigate why this isn't being entered:

    if (absoluteCursorY === commandStartY && buffer.cursorX > 1) {
    // Ghost text in pwsh only appears to happen on the cursor line
    ghostTextIndex = this._scanForGhostText(buffer, line, cursorIndex);
    }

  7. Tyriar commented on Feb 10, 2025

    @Tyriar
    Contributor

    TylerLeonhardt was seeing something similar to this for pwsh where he had a inline suggestions with a custom style that did not include the dim/faint sequence which is how we detect pwsh ghost text atm. Fish may have the same problem?

  8. meganrogge commented on Feb 10, 2025

    @meganrogge
    CollaboratorAuthor

    it never enters here, even when there's ghost text

    ghostTextIndex = cursorIndex + potentialGhostIndexOffset;

  9. meganrogge commented on Feb 10, 2025

    @meganrogge
    CollaboratorAuthor

    cell.isDim() and cell.isItalic() are always false here - which makes sense given the ghost text is neither dimmed nor italic

    Image
  10. meganrogge commented on Feb 10, 2025

    @meganrogge
    CollaboratorAuthor

    works for pwsh though

    Image
  11. meganrogge commented on Feb 10, 2025

    @meganrogge
    CollaboratorAuthor

    I think we just need to check if the cell is >= cursor position for fish?

  12. meganrogge commented on Feb 10, 2025

    @meganrogge
    CollaboratorAuthor

    That seems to work, though will fall apart when someone moves their cursor.

  13. added a commit that references this issue on Feb 10, 2025
  14. meganrogge commented on Feb 11, 2025

    @meganrogge
    CollaboratorAuthor

    Image

  15. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Feb 11, 2025
  16. locked and limited conversation to collaborators on Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestinsiders-releasedon-testplanterminal-suggest

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions