Skip to content

Feature: /sessions <query> opens the session picker pre-filtered (search from the command line) #1232

Description

@alecuba16

Hi, I am a jcode user and I want to share a small feature idea.

Problem

The session picker already has a search bar (press /). But to use it, you first open the picker, then press /, then type. When you already know what you are looking for, this is extra steps.

Proposal

Allow to pass the search text directly in the command:

/sessions deploy bug

This opens the session picker with the list already filtered by "deploy bug" and the search bar active, so the user can continue typing to refine, or press Enter to resume.

Also works with the aliases /session <query> and /resume <query>.

Implementation

I already implemented this in my fork, branch session-picker-search:

  • SessionPicker::start_search(query) enters search mode with an initial query and filters immediately.
  • open_session_picker_with_query(Some(query)) wires it into the local and remote command dispatch.
  • Unit tests for the bare command, the query version, and whitespace-only query.
/sessions          -> picker opens like before
/sessions deploy   -> picker opens filtered by "deploy", search bar active

Happy to open a PR if the feature is interesting. Thank you for jcode, it is a great tool.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions