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

Ability to reference snippets in aliases. #3108

Closed
2 tasks
Qwerty-133 opened this issue Sep 29, 2021 · 3 comments · Fixed by #3124
Closed
2 tasks

Ability to reference snippets in aliases. #3108

Qwerty-133 opened this issue Sep 29, 2021 · 3 comments · Fixed by #3124
Assignees

Comments

@Qwerty-133
Copy link
Contributor

Is your feature request related to a problem? Please elaborate.

There is currently no way to add aliases to snippets. One cannot have a snippet with a descriptive name and have a shorter, concise way to invoke it.

Describe the solution you'd like

?alias add alias-name snippet-name should be possible.

Does your solution involve any of the following?

  • Logviewer
  • New config option

Describe alternatives you've considered

Adding a new snippet with the name of the "alias" you wish, with the same contents. This works, but is problematic when you want to pull up the list of snippets and see duplicated snippets. It also requires you to edit each snippet when you wish to change the contents.

Who will this benefit?

Mainly servers which use a lot of snippets and need aliases to them.

Additional Information

No response

@Qwerty-133
Copy link
Contributor Author

Qwerty-133 commented Nov 20, 2021

A better alternative could be having aliases directly be a part of the snippet interface, so that snippet <alias> wouldn't fail. Which would imply adding commands to add/remove aliases to snippets and help <snippet> possibly displaying its aliases as well.

@Qwerty-133
Copy link
Contributor Author

Qwerty-133 commented Nov 21, 2021

@fourjr How should we be handling snippet deletions? Removing the snippet from the alias but preserving the other steps seems to make the most sense to me (along with informing the user).

@fourjr
Copy link
Collaborator

fourjr commented Nov 22, 2021

@Qwerty-133 I think skipping the snippet step would work, yup.

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

Successfully merging a pull request may close this issue.

2 participants