Skip to content

Could autosuggestion give suggestions based on history of current directory #844

@Ray-Zhang-33

Description

@Ray-Zhang-33

This is not a problem for everyday usage, but it undermines accuracy and utility a bit.

Problem Description

The current autosuggestion feature, which relies on command input history, uses a global history log.

This approach leads to non-optimal suggestions, especially when switching between different projects or directories. Commands with similar initial characters often require vastly different arguments depending on the specific folder/project context.

Examples of the issue

In one project directory, a user might use git push origin main, but in another project, they might use git push origin master.

Similarly, one project might require nvm use 18.10.0, while another needs nvm use 22.0.0.

When developing both projects concurrently, the autosuggestion frequently suggests the last globally-used command, which is often irrelevant, confusing, and requires manual correction, thereby reducing the plugin's effectiveness.

Proposed feature.

Implementing a mechanism to provide command suggestions based on the input history specific to the current directory (or project root) would solve this problem.

This directory-based/contextual history would significantly improve the accuracy and utility of the autosuggestion feature, allowing the plugin to better serve users working on multiple distinct projects.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions