Skip to content

Make favorite queries execute mycli's special commands #747

@statox

Description

@statox

Hi everyone,

I'm not sure if this is a bug or if I'm missing something so I would appreciate some help:

I have a script file that I need to source regularly, using this command it works fine:

source /home/statox/projects/boilerplate/setup.sql

I tried to make it a favorite command with this command:

\fs setupkey source /home/statox/projects/boilerplate/setup.sql

And also by adding this line directly in my .myclirc:

[favorite_queries]
...
setupkey = 'source /home/statox/projects/boilerplate/setup.sql'

In both cases everything is fine (no startup error or anything) until I try to execute the command:

mysql user@localhost:newws> \f setupkey
(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'source /home/statox/projects/boilerplate/setup.sql' at line 1")

I am sure that my sql script works fine since I can execute it directly and my other favorite commands (which don't use source) all work fine so I don't know how to fix my issue and I didn't found a related issue yet.

Also mycli -v returns Version: 1.8.1

Anyway thank you for your great tool 👍

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