You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

558 lines
14 KiB

  1. # Changes in version 0.6.0
  2. This is a stable release, featuring bugfixes and minor improvements.
  3. ## Performance improvements:
  4. (none)
  5. ## Added highlighting of:
  6. - The `isearch` and `suffix` [`$zle_highlight` settings][zshzle-Character-Highlighting].
  7. (79e4d3d12405, 15db71abd0cc, b56ee542d619; requires zsh 5.3 for `$ISEARCHMATCH_ACTIVE` / `$SUFFIX_ACTIVE` support)
  8. [zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
  9. - Possible history expansions in double-quoted strings.
  10. (76ea9e1df316)
  11. - Mismatched `if`/`then`/`elif`/`else`/`fi`.
  12. (73cb83270262)
  13. ## Fixed highlighting of:
  14. - A comment line followed by a non-comment line.
  15. (#385, 9396ad5c5f9c)
  16. - An unquoted `$*` (expands to the positional parameters).
  17. (237f89ad629f)
  18. - history-incremental-pattern-search-backward under zsh 5.3.1.
  19. (#407, #415, 462779629a0c)
  20. ## API changes (for highlighter authors):
  21. (none)
  22. ## Developer-visible changes:
  23. - tests: Set the `ALIAS_FUNC_DEF` option for zsh 5.4 compatibility.
  24. (9523d6d49cb3)
  25. ## Other changes:
  26. - docs: Added before/after screenshots.
  27. (cd9ec14a65ec..b7e277106b49)
  28. - docs: Link Fedora package.
  29. (3d74aa47e4a7, 5feed23962df)
  30. - docs: Link FreeBSD port.
  31. (626c034c68d7)
  32. - docs: Link OpenSUSE Build Service packages
  33. (#419, dea1fedc7358)
  34. - Prevent user-defined aliases from taking effect in z-sy-h's own code.
  35. (#390, 2dce602727d7, 8d5afe47f774; and #392, #395, b8fa1b9dc954)
  36. - docs: Update zplug installation instructions.
  37. (#399, 4f49c4a35f17)
  38. - Improve "unhandled ZLE widget 'foo'" error message.
  39. (#409, be083d7f3710)
  40. - Fix printing of "failed loading highlighters" error message.
  41. (#426, ad522a091429)
  42. # Changes in version 0.5.0
  43. ## Performance improvements:
  44. We thank Sebastian Gniazdowski and "m0viefreak" for significant contributions
  45. in this area.
  46. - Optimize string operations in the `main` (default) highlighter.
  47. (#372/3cb58fd7d7b9, 02229ebd6328, ef4bfe5bcc14, #372/c6b6513ac0d6, #374/15461e7d21c3)
  48. - Command word highlighting: Use the `zsh/parameter` module to avoid forks.
  49. Memoize (cache) the results.
  50. (#298, 3ce01076b521, 2f18ba64e397, 12b879caf7a6; #320, 3b67e656bff5)
  51. - Avoid forks in the driver and in the `root` highlighter.
  52. (b9112aec798a, 38c8fbea2dd2)
  53. ## Added highlighting of:
  54. - `pkexec` (a precommand).
  55. (#248, 4f3910cbbaa5)
  56. - Aliases that cannot be defined normally nor invoked normally (highlighted as an error).
  57. (#263 (in part), 28932316cca6)
  58. - Path separators (`/`) — the default behaviour remains to highlight path separators
  59. and path components the same way.
  60. (#136, #260, 6cd39e7c70d3, 9a934d291e7c, f3d3aaa00cc4)
  61. - Assignments to individual positional arguments (`42=foo` to assign to `$42`).
  62. (f4036a09cee3)
  63. - Linewise region (the `visual-line-mode` widget, bound to `V` in zsh's `vi` keymap).
  64. (#267, a7a7f8b42280, ee07588cfd9b)
  65. - Command-lines recalled by `isearch` mode; requires zsh≥5.3.
  66. (#261 (in part); #257; 4ad311ec0a68)
  67. - Command-lines whilst the `IGNORE_BRACES` or `IGNORE_CLOSE_BRACES` option is in effect.
  68. (a8a6384356af, 02807f1826a5)
  69. - Mismatched parentheses and braces (in the `main` highlighter).
  70. (51b9d79c3bb6, 2fabf7ca64b7, a4196eda5e6f, and others)
  71. - Mismatched `do`/`done` keywords.
  72. (b2733a64da93)
  73. - Mismatched `foreach`/`end` keywords.
  74. (#96, 2bb8f0703d8f)
  75. - In Bourne-style function definitions, when the `MULTI_FUNC_DEF` option is set
  76. (which is the default), highlight the first word in the function body as
  77. a command word: `f() { g "$@" }`.
  78. (6f91850a01e1)
  79. - `always` blocks.
  80. (#335, e5782e4ddfb6)
  81. - Command substitutions inside double quotes, `"$(echo foo)"`.
  82. (#139 (in part), c3913e0d8ead)
  83. - Non-alphabetic parameters inside double quotes (`"$$"`, `"$#"`, `"$*"`, `"$@"`, `"$?"`, `"$-"`).
  84. (4afe670f7a1b, 44ef6e38e5a7)
  85. - Command words from future versions of zsh (forward compatibly).
  86. This also adds an `arg0` style that all other command word styles fall back to.
  87. (b4537a972eed, bccc3dc26943)
  88. - Escaped history expansions inside double quotes: `: "\!"`
  89. (28d7056a7a06, et seq)
  90. ## Fixed highlighting of:
  91. - Command separator tokens in syntactically-invalid positions.
  92. (09c4114eb980)
  93. - Redirections with a file descriptor number at command word.
  94. (#238 (in part), 73ee7c1f6c4a)
  95. - The `select` prompt, `$PS3`.
  96. (#268, 451665cb2a8b)
  97. - Values of variables in `vared`.
  98. (e500ca246286)
  99. - `!` as an argument (neither a history expansion nor a reserved word).
  100. (4c23a2fd1b90)
  101. - "division by zero" error under the `brackets` highlighter when `$ZSH_HIGHLIGHT_STYLES` is empty.
  102. (f73f3d53d3a6)
  103. - Process substitutions, `<(pwd)` and `>(wc -l)`.
  104. (#302, 6889ff6bd2ad, bfabffbf975c, fc9c892a3f15)
  105. - The non-`SHORT_LOOPS` form of `repeat` loops: `repeat 42; do true; done`.
  106. (#290, 4832f18c50a5, ef68f50c048f, 6362c757b6f7)
  107. - Broken symlinks (are now highlighted as files).
  108. (#342, 95f7206a9373, 53083da8215e)
  109. - Lines accepted from `isearch` mode.
  110. (#284; #257, #259, #288; 5bae6219008b, a8fe22d42251)
  111. - Work around upstream bug that triggered when the command word was a relative
  112. path, that when interpreted relative to a $PATH directory denoted a command;
  113. the effect of that upstream bug was that the relative path was cached as
  114. a "valid external command name".
  115. (#354, #355, 51614ca2c994, fdaeec45146b, 7d38d07255e4;
  116. upstream fix slated to be released in 5.3 (workers/39104))
  117. - After accepting a line with the cursor on a bracket, the matching bracket
  118. of the bracket under the cursor no longer remains highlighted (with the
  119. `brackets` highlighter).
  120. (4c4baede519a)
  121. - The first word on a new line within an array assignment or initialization is no
  122. longer considered a command position.
  123. (8bf423d16d46)
  124. - Subshells that end at command position, `(A=42)`, `(true;)`.
  125. (#231, 7fb6f9979121; #344, 4fc35362ee5a)
  126. - Command word after array assignment, `a=(lorem ipsum) pwd`.
  127. (#330, 7fb6f9979121)
  128. ## API changes (for highlighter authors):
  129. - New interface `_zsh_highlight_add_highlight`.
  130. (341a3ae1f015, c346f6eb6fb6)
  131. - tests: Specify the style key, not its value, in test expectations.
  132. (a830613467af, fd061b5730bf, eaa4335c3441, among others)
  133. - Module author documentation improvements.
  134. (#306 (in part), 217669270418, 0ff354b44b6e, 80148f6c8402, 364f206a547f, and others)
  135. - The driver no longer defines a `_zsh_highlight_${highlighter}_highlighter_cache`
  136. variable, which is in the highlighters' namespace.
  137. (3e59ab41b6b8, 80148f6c8402, f91a7b885e7d)
  138. - Rename highlighter entry points. The old names remain supported for
  139. backwards compatibility.
  140. (a3d5dfcbdae9, c793e0dceab1)
  141. - tests: Add the "NONE" expectation.
  142. (4da9889d1545, 13018f3dd735, d37c55c788cd)
  143. - tests: consider a test that writes to stderr to have failed.
  144. (#291, 1082067f9315)
  145. ## Developer-visible changes:
  146. - Add `make quiet-test`.
  147. (9b64ad750f35)
  148. - test harness: Better quote replaceables in error messages.
  149. (30d8f92df225)
  150. - test harness: Fix exit code for XPASS.
  151. (bb8d325c0cbd)
  152. - Create [HACKING.md](HACKING.md).
  153. (cef49752fd0e)
  154. - tests: Emit a description for PASS test points.
  155. (6aa57d60aa64, f0bae44b76dd)
  156. - tests: Create a script that generates a test file.
  157. (8013dc3b8db6, et seq; `tests/generate.zsh`)
  158. ## Other changes:
  159. - Under zsh≤5.2, widgets whose names start with a `_` are no longer excluded
  160. from highlighting.
  161. (ed33d2cb1388; reverts part of 186d80054a40 which was for #65)
  162. - Under zsh≤5.2, widgets implemented by a function named after the widget are
  163. no longer excluded from highlighting.
  164. (487b122c480d; reverts part of 776453cb5b69)
  165. - Under zsh≤5.2, shell-unsafe widget names can now be wrapped.
  166. (#278, 6a634fac9fb9, et seq)
  167. - Correct some test expectations.
  168. (78290e043bc5)
  169. - `zsh-syntax-highlighting.plugin.zsh`: Convert from symlink to plain file
  170. for msys2 compatibility.
  171. (#292, d4f8edc9f3ad)
  172. - Document installation under some plugin managers.
  173. (e635f766bef9, 9cab566f539b)
  174. - Don't leak the `PATH_DIRS` option.
  175. (7b82b88a7166)
  176. - Don't require the `FUNCTION_ARGZERO` option to be set.
  177. (#338, 750aebc553f2)
  178. - Under zsh≤5.2, support binding incomplete/nonexistent widgets.
  179. (9e569bb0fe04, part of #288)
  180. - Make the driver reentrant, fixing possibility of infinite recursion
  181. under zsh≤5.2 under interaction with theoretical third-party code.
  182. (#305, d711563fe1bf, 295d62ec888d, f3242cbd6aba)
  183. - Fix warnings when `WARN_CREATE_GLOBAL` is set prior to sourcing zsh-syntax-highlighting.
  184. (z-sy-h already sets `WARN_CREATE_GLOBAL` internally.)
  185. (da60234fb236)
  186. - Warn only once, rather than once per keypress, when a highlighter is unavailable.
  187. (0a9b347483ae)
  188. # Changes in version 0.4.1
  189. ## Fixes:
  190. - Arguments to widgets were not properly dash-escaped. Only matters for widgets
  191. that take arguments (i.e., that are invoked as `zle ${widget} -- ${args}`).
  192. (282c7134e8ac, reverts c808d2187a73)
  193. # Changes in version 0.4.0
  194. ## Added highlighting of:
  195. - incomplete sudo commands
  196. (a3047a912100, 2f05620b19ae)
  197. sudo;
  198. sudo -u;
  199. - command words following reserved words
  200. (#207, #222, b397b12ac139 et seq, 6fbd2aa9579b et seq, 8b4adbd991b0)
  201. if ls; then ls; else ls; fi
  202. repeat 10 do ls; done
  203. (The `ls` are now highlighted as a command.)
  204. - comments (when `INTERACTIVE_COMMENTS` is set)
  205. (#163, #167, 693de99a9030)
  206. echo Hello # comment
  207. - closing brackets of arithmetic expansion, subshells, and blocks
  208. (#226, a59f442d2d34, et seq)
  209. (( foo ))
  210. ( foo )
  211. { foo }
  212. - command names enabled by the `PATH_DIRS` option
  213. (#228, 96ee5116b182)
  214. # When ~/bin/foo/bar exists, is executable, ~/bin is in $PATH,
  215. # and 'setopt PATH_DIRS' is in effect
  216. foo/bar
  217. - parameter expansions with braces inside double quotes
  218. (#186, 6e3720f39d84)
  219. echo "${foo}"
  220. - parameter expansions in command word
  221. (#101, 4fcfb15913a2)
  222. x=/bin/ls
  223. $x -l
  224. - the command separators '|&', '&!', '&|'
  225. view file.pdf &! ls
  226. ## Fixed highlighting of:
  227. - precommand modifiers at non-command-word position
  228. (#209, 2c9f8c8c95fa)
  229. ls command foo
  230. - sudo commands with infix redirections
  231. (#221, be006aded590, 86e924970911)
  232. sudo -u >/tmp/foo.out user ls
  233. - subshells; anonymous functions
  234. (#166, #194, 0d1bfbcbfa67, 9e178f9f3948)
  235. (true)
  236. () { true }
  237. - parameter assignment statements with no command
  238. (#205, 01d7eeb3c713)
  239. A=1;
  240. (The semicolon used to be highlighted as a mistake)
  241. - cursor highlighter: Remove the cursor highlighting when accepting a line.
  242. (#109, 4f0c293fdef0)
  243. ## Removed features:
  244. - Removed highlighting of approximate paths (`path_approx`).
  245. (#187, 98aee7f8b9a3)
  246. ## Other changes:
  247. - main highlighter refactored to use states rather than booleans.
  248. (2080a441ac49, et seq)
  249. - Fix initialization when sourcing `zsh-syntax-highlighting.zsh` via a symlink
  250. (083c47b00707)
  251. - docs: Add screenshot.
  252. (57624bb9f64b)
  253. - widgets wrapping: Don't add '--' when invoking widgets.
  254. (c808d2187a73) [_reverted in 0.4.1_]
  255. - Refresh highlighting upon `accept-*` widgets (`accept-line` et al).
  256. (59fbdda64c21)
  257. - Stop leaking match/mbegin/mend to global scope (thanks to upstream
  258. `WARN_CREATE_GLOBAL` improvements).
  259. (d3deffbf46a4)
  260. - 'make install': Permit setting `$(SHARE_DIR)` from the environment.
  261. (e1078a8b4cf1)
  262. - driver: Tolerate KSH_ARRAYS being set in the calling context.
  263. (#162, 8f19af6b319d)
  264. - 'make install': Install documentation fully and properly.
  265. (#219, b1619c001390, et seq)
  266. - docs: Improve 'main' highlighter's documentation.
  267. (00de155063f5, 7d4252f5f596)
  268. - docs: Moved to a new docs/ tree; assorted minor updates
  269. (c575f8f37567, 5b34c23cfad5, et seq)
  270. - docs: Split README.md into INSTALL.md
  271. (0b3183f6cb9a)
  272. - driver: Report `$ZSH_HIGHLIGHT_REVISION` when running from git
  273. (84734ba95026)
  274. ## Developer-visible changes:
  275. - Test harness converted to [TAP](http://testanything.org/tap-specification.html) format
  276. (d99aa58aaaef, et seq)
  277. - Run each test in a separate subprocess, isolating them from each other
  278. (d99aa58aaaef, et seq)
  279. - Fix test failure with nonexisting $HOME
  280. (#216, b2ac98b98150)
  281. - Test output is now colorized.
  282. (4d3da30f8b72, 6fe07c096109)
  283. - Document `make install`
  284. (a18a7427fd2c)
  285. - tests: Allow specifying the zsh binary to use.
  286. (557bb7e0c6a0)
  287. - tests: Add 'make perf' target
  288. (4513eaea71d7)
  289. - tests: Run each test in a sandbox directory
  290. (c01533920245)
  291. # Changes in version 0.3.0
  292. ## Added highlighting of:
  293. - suffix aliases (requires zsh 5.1.1 or newer):
  294. alias -s png=display
  295. foo.png
  296. - prefix redirections:
  297. <foo.txt cat
  298. - redirection operators:
  299. echo > foo.txt
  300. - arithmetic evaluations:
  301. (( 42 ))
  302. - $'' strings, including \x/\octal/\u/\U escapes
  303. : $'foo\u0040bar'
  304. - multiline strings:
  305. % echo "line 1
  306. line 2"
  307. - string literals that haven't been finished:
  308. % echo "Hello, world
  309. - command words that involve tilde expansion:
  310. % ~/bin/foo
  311. ## Fixed highlighting of:
  312. - quoted command words:
  313. % \ls
  314. - backslash escapes in "" strings:
  315. % echo "\x41"
  316. - noglob after command separator:
  317. % :; noglob echo *
  318. - glob after command separator, when the first command starts with 'noglob':
  319. % noglob true; echo *
  320. - the region (vi visual mode / set-mark-command) (issue #165)
  321. - redirection and command separators that would be highlighted as `path_approx`
  322. % echo foo;‸
  323. % echo <
  324. (where `‸` represents the cursor location)
  325. - escaped globbing (outside quotes)
  326. % echo \*
  327. ## Other changes:
  328. - implemented compatibility with zsh's paste highlighting (issue #175)
  329. - `$?` propagated correctly to wrapped widgets
  330. - don't leak $REPLY into global scope
  331. ## Developer-visible changes:
  332. - added makefile with `install` and `test` targets
  333. - set `warn_create_global` internally
  334. - document release process
  335. # Version 0.2.1
  336. (Start of changelog.)