[MDEV-12192] Shell-style alias/unalias commands for MariaDB client Created: 2017-03-07  Updated: 2022-11-28

Status: In Review
Project: MariaDB Server
Component/s: Scripts & Clients
Fix Version/s: 11.0

Type: Task Priority: Minor
Reporter: Sergey Vojtovich Assignee: Vicențiu Ciorbaru
Resolution: Unresolved Votes: 0
Labels: contribution, foundation

Issue Links:
Relates
relates to MDEV-30062 Remove unnecessary delimiter from que... In Review

 Description   

mariadb client should support alias creation and removing of aliases via unalias.
Example of use case:

MariaDB [(none)]> alias x="select 1";
MariaDB [(none)]> alias
alias x = 'select 1'
MariaDB [(none)]> x;
+---+
| x|
+---+
| 1 |
+---+
# Remove alias
MariaDB [(none)]> unalias x;



 Comments   
Comment by Vicențiu Ciorbaru [ 2021-07-07 ]

anel After discussing with serg, we believe the idea has its merit. Can you pick up this task when there isn't anything else burning and see if you can make use of Nirbhay's PR and address Svoj's comments?

Then assign it to me for Review.

Comment by Ralf Gebhardt [ 2022-11-17 ]

Will there be implemented a shortcut /a ? How will an alias be removed?
I like the way https://www.mycli.net/favorites is doing it with explicit commands for saving and removing and alias. I also think that the term "favorite" matches the use case better.

Comment by Anel Husakovic [ 2022-11-17 ]

Hi ralf.gebhardt,
have updated the description.
There has been some work on argument passing, but will take a look of shortcuts.

Generated at Thu Feb 08 07:55:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.