先ほどのMySQLクライアントから次にアップグレードしました。mariadb-クライアント-10.0.21-3Arch Linuxで。アップグレード後にEmacs機能を使用するsql-mysql
と、プロンプトが表示されなくなります。
mysql
出力の最初の行に表示されるように、プロンプトをバッファリングしているようです。
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 19662
Server version: 4.1.11-standard-log
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
show tables;
MySQL [dbname]> +---------------------------------------------------------+
| Tables_in_dbname |
+---------------------------------------------------------+
...
+---------------------------------------------------------+
80 rows in set (0.02 sec)
help
MySQL [dbname]>
General information about MariaDB can be found at
http://mariadb.org
List of all MySQL commands:
...
For server side help, type 'help contents'
?
MySQL [dbname]>
General information about MariaDB can be found at
http://mariadb.org
List of all MySQL commands:
...
For server side help, type 'help contents'
exit
MySQL [dbname]> Bye
すべての場合において、「」の前の行はMySQL [dbname]>
私が入力したものです。 (...
出力は省略します。)
プロンプトが正しく表示されるようにするにはどうすればよいですか?-n
オプションを試しましたが、うまくいきませmysql
んでした。端末で実行するとうまくmysql
動作します。
ベストアンサー1
特殊文字をエスケープするのを忘れました。 Elisp-regexのバックスラッシュは、最初の\がLisp文字列によって飲み込まれるため、かなり重くなります。バラよりhttps://www.emacswiki.org/emacs/RegularExpression
MariaDBとMySQLをキャプチャするために設定に以下を追加しました.
(sql-set-product-feature 'mysql :prompt-regexp "^\\(MariaDB\\|MySQL\\) \\[[_a-zA-Z]*\\]> ")