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

Favorites/Shortcuts/Quick List #5273

Closed
ThatWionGuy opened this issue Apr 7, 2020 · 4 comments
Closed

Favorites/Shortcuts/Quick List #5273

ThatWionGuy opened this issue Apr 7, 2020 · 4 comments
Labels
Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@ThatWionGuy
Copy link

Description of the new feature/enhancement

There are many commands that I either use frequently and some I use only once and a while but not frequently enough to memorize them. It would be nice if there was a way to store these and then access them from the terminal app to be executed when needed. A perfect example of this is the command to see all globally installed npm packages:

npm list -g --depth 0

I do this at least once a month which is just long enough to forget the exact line, so then I have to open Google and search for the command again, copy it and paste it into the terminal, which takes up time I should be using for other things.

The best way to keep a user engaged is to keep them from having to leave your app. By providing a way to quickly execute commands inside the terminal app, you allow users to be more productive and spend less time changing apps.

General Idea

What I am thinking would be an aside on the left or right of the window. Would be hidden by default but able to be shown through the main menu or keyboard shortcut. Could be called Favorites, Shortcuts or Quick List the naming is completely up to you, but for consistency and ease of explanation I will refer to it as "favorites" through the rest of this proposal.

It would display these favorite commands where the user could just click on one of them and the app would input the command into the active terminal. The panel would be scoped to the current active terminal i.e. a cmd terminal would show the favorites for cmd, and if the user switched to a powershell terminal then the favorites would switch to powershell favorites.

windows-terminal-favorites
Image is a wireframe not a polished UI

Proposed technical implementation details (optional)

Management of these favorites could be accomplished in the profiles section of the settings file, so no need to make a fancy GUI to manage the favorites. It could be structured something like this:

...
"profiles" : 
    [
        {
            ...,
            "favorites" : [
                 {
                     "name" : "List global npm packages",
                     "command" : "npm list -g --depth 0",
                     "auto-run" : false
                 }
            ],
        },
        ...
    ]
    ...
}
Property Type Usage
name string What shows up in the aside panel
command string What to inject into the terminal when clicked
auto-run (optional) boolean Whether to run the command or just input into the terminal. Default to false.

Since the user enters them in the profile settings there is no need to manage whether the command is actually a windows cmd, valid powershell or valid bash command... it is up to the user to put the favorites into the correct profile, correct order and to put valid commands. Terminal app would just display the list of favorites sorted by array order, based on the currently active profile and inject/execute the commands when they were clicked. Also since they are defined in the profiles the look and feel of the aside could match the profiles theme.

There would also need to be some kind of message to display if there are no current favorites for a profile. Something like "You currently have no favorites for this profile." and maybe a link to add a favorite which would open the settings file with a new favorite stubbed out.

The injection/execution could easily be accomplished in a variety of ways depending on the level of access to the underlying terminal that the app has (I will be honest, I have not looked into the code a lot) But even if you had to do it via sending the keystrokes to the underlying terminal and if auto-run is true sending a Enter Key at the end would be basically no different than the app typing the command for the user.

I am really not trying to completely design it out for you... just trying to give a general feature proposal so if you think of a better design and do it completely different I would not be offended, just wish that a feature like this existed.

Possible future enhancements

Initially just displaying the list, allowing injection/execution of the commands on click and management through the settings would allow this feature to be functional and useful to users. But if desired, future enhancements could be added that would only provide better usability such as:

  • Change sort order by drag and drop in aside.
  • Add new favorite via GUI (Dialog, or integrated UI)
  • Add new favorite from last executed command.
  • Group Commands into collapsible sections for better organization.
  • Support executing multiple commands on a single click.

Again these would be nice to haves later, but in no way necessary to provide a usable feature that provides value to the user.

@ThatWionGuy ThatWionGuy added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Apr 7, 2020
@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 7, 2020
@zadjii-msft
Copy link
Member

zadjii-msft commented Apr 8, 2020

I think this is an excellent extension idea. It's actually something I've been toying around with for a long time, but you've actually written up lots of the ideas I've had 😅.

I'm going to mark this up as an extension, and toss it onto the backlog.

shameless self-plug:
I've personally been working on a tool that does a lot of similar things to what you're requesting, just straight from the commandline as opposed to as a part of the UI.
image

You can check it out over at zadjii/keep. Admittedly, I only update it when I feel the itch, and it only works for CMD, but it works for me ¯\_(ツ)_/¯

</shameless self-plug>

My own personal goal is to get the Terminal to a place where I can integrate a bunch of the features from that helper tool more directly into the UI. I've been thinking of doing it with a combination of:

One way or not, this is an excellent addition to my collection of extension ideas. Thanks!

@zadjii-msft zadjii-msft added Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Product-Terminal The new Windows Terminal. labels Apr 8, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 8, 2020
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Apr 8, 2020
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Apr 8, 2020
@ThatWionGuy
Copy link
Author

NP and thank you for the quick response. I look forward to what you come up with. Also thank you for adding this to the #4000 list.

When it comes time to start I am willing to help in anyway. This is a feature I wish all command lines had, so if I can do anything to help the process along I am all on board.

@zadjii-msft
Copy link
Member

You know what, this is actually basically the same as #1595. I've moved relevant bits of the discussion there. /dup #1595

@ghost
Copy link

ghost commented Sep 18, 2021

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Sep 18, 2021
@ghost ghost added the Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. label Sep 18, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Extensibility A feature that would ideally be fulfilled by us having an extension model. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants