Commit Graph

4 Commits

Author SHA1 Message Date
Johannes Altmanninger
a0477b1016 rc format: restore in-client error when formatcmd fails
Commit 5b1f9255 (rc: Use the standard `fail` command to report errors,
2019-11-14) replaced uses of "echo -markup {Error}" with "fail".
This made format-buffer do

	echo "eval -client $kak_client %{ fail }" | kak -p $kak_session

Unfortunately "fail" fails in the client spawned by "kak -p" and not
in $kak_client where the user would see the message. Correct this.

While at it, clarify the error message, so users immediately know
that the number is the exit code.

Fixes #3254
2022-04-09 15:36:02 +02:00
Frank LENORMAND
a548caaebe rc: Consistently use a dot as template separator
Other scripts uses a dot `.` to separate the seed from the rest of
the template, making that standard across the codebase allows running
cleanup commands like `rm -rf /tmp/kak-*.*`.
2020-11-30 14:24:06 +03:00
Frank LENORMAND
5b1f9255a1 rc: Use the standard fail command to report errors
Merely using `echo` with markup doesn't log errors in the debug
buffers, and is also less readable.
2019-11-14 08:32:55 +01:00
Maxime Coste
90f83780a5 Rename formatter.kak to format.kak and alias format to format-buffer 2019-09-15 10:52:06 +10:00