plexigras
2fad544a63
formatted chroma array
2018-08-22 22:24:58 +02:00
plexigras
c1f0d23c7a
added subcommand chroma
2018-08-22 22:24:32 +02:00
plexigras
04569241ae
added alias chroma
2018-08-10 11:52:00 +02:00
Sebastian Gniazdowski
ff660d69e9
*-highlight: Fix math-mode highlighting of underscore-starting variables
2018-08-10 06:00:05 +02:00
plexigras
f8dbded75d
chroma for whatis and man ( #54 )
...
* added whatis chroma
* changed != to = in whatis chroma
* made vars local
2018-08-09 19:25:45 +02:00
Sebastian Gniazdowski
a68823633e
*-highlight: More smart array assignment's end-paren detection
2018-08-09 18:13:00 +02:00
Sebastian Gniazdowski
0dcd732e9b
*-highlight: Ideal string highlighting
...
Issue #53
2018-08-09 15:34:56 +02:00
Sebastian Gniazdowski
ee871b41c1
*-highlight: Optimization – no string indexing but pattern
2018-08-09 10:14:19 +02:00
Sebastian Gniazdowski
e06288a617
*-highlight,fast-theme: Allow fancy FAST_WORK_DIR=XDG or ="~/.fsh", etc.
...
Issue #52
2018-08-07 19:05:26 +02:00
Sebastian Gniazdowski
0d829fd62f
*-highlight,fast-theme: Support custom FAST_WORK_DIR for storing data
...
Issue #52
2018-08-07 18:36:07 +02:00
Sebastian Gniazdowski
848b082501
fast-highlight: Fix red closing ) for $( cmd subst )
2018-08-06 16:18:28 +02:00
Sebastian Gniazdowski
efcc8f6a95
*-highlight: Protect against similar hypothetical regressions at chroma
2018-08-06 16:02:34 +02:00
Sebastian Gniazdowski
d3e7a2cfb4
*-highlight: Fix regression after "$var" -> $var optimization
2018-08-06 15:57:36 +02:00
Sebastian Gniazdowski
55f1cc996e
*-highlight: Fix regression after "$var" -> $var optimization
2018-08-06 15:46:53 +02:00
Sebastian Gniazdowski
17eb31fc28
*-highlight: Optimization: non-quoted variable use ($var, not "$var")
2018-08-06 15:03:29 +02:00
Sebastian Gniazdowski
60d753e351
*-highlight: Alternate syntax - support: if cmd && [[ ... ]] { ... }
...
Issue #50
2018-08-06 07:11:42 +02:00
Sebastian Gniazdowski
7d1d5b4af3
*-highlight: Optimize 2 commands into 1 math command #50
2018-08-06 07:02:19 +02:00
Sebastian Gniazdowski
2f8327705b
*-highlight: Support alternate syntax #50
2018-08-06 06:47:00 +02:00
Sebastian Gniazdowski
15cb6691ac
*-highlight,fast-theme: Support for overlay "theme", can have a few keys
...
User can run e.g. fast-theme XDG:overlay to have ~/.config/fsh/overlay.ini
loaded on top of main-theme. Overlay can contain only a few keys.
Issue #49
2018-08-04 23:38:17 +02:00
Sebastian Gniazdowski
b0cff44110
*-highlight,fast-theme: Support for custom themes (given as file-paths)
...
Supported path-shorthands:
XDG: = ${XDG_CONFIG_HOME:-$HOME/.config}/fsh
LOCAL: = /usr/local/share/fsh/
HOME: = $HOME/.fsh/
OPT: = /opt/local/share/fsh/
Issue #49
2018-08-04 21:45:21 +02:00
Sebastian Gniazdowski
2d8f0e49e1
*-highlight: Correctly highlight $VAR, $~VAR, ${+VAR}, etc. in strings
2018-08-02 20:10:20 +02:00
Sebastian Gniazdowski
e3032d9f3b
*-highlight: ${#PREBUFFER} -> __PBUFLEN, equal performance
2018-08-02 19:56:52 +02:00
Sebastian Gniazdowski
f0a71219d9
*-highlight: Make case conditions and brackets highlighter compatible
...
Issue #43
2018-08-02 18:44:26 +02:00
Sebastian Gniazdowski
781f68ee55
*-highlight: Recognize more case-item-end tokens
2018-08-02 18:41:34 +02:00
Sebastian Gniazdowski
206c122caf
*-highlight: Remove unused 4th __arg_type
2018-08-02 18:34:29 +02:00
Sebastian Gniazdowski
00b41eff39
*-highlight,themes,fast-theme: Support for global aliases #41
2018-08-02 05:11:08 +02:00
Sebastian Gniazdowski
0281aa0ba3
*-highlight: First place that checks paths now also respects the *BLIST*
...
Issue #22
2018-07-31 16:37:17 +02:00
Sebastian Gniazdowski
c772b9bafa
*-highlight: Suppress recursive highlighting for $(( ... ))
2018-07-31 14:35:30 +02:00
Sebastian Gniazdowski
28898604c4
*-highlight: Correct place to initialize $_FAST_COMPLEX_BRACKETS
...
Issue #43
2018-07-31 14:25:11 +02:00
Sebastian Gniazdowski
5078261242
*-highlight,README: Brackets highlighter active by default
...
Issue #43
2018-07-31 13:05:57 +02:00
Sebastian Gniazdowski
2ee3073711
*-highlight,*string-*: Brackets in [[..]], ((..)), etc. handled normally
...
Issue #43
2018-07-31 12:58:28 +02:00
Sebastian Gniazdowski
a03f0045fd
themes: Add 4 new styles (brackets)
...
Issue #43
2018-07-30 08:21:03 +02:00
Sebastian Gniazdowski
264676c540
*-highlight: Differentiate path and to-dir path. New style: path-to-dir
...
Issue #37
2018-07-28 14:01:03 +02:00
Sebastian Gniazdowski
cfbd820f67
*-highlight: Investigation of return-1 from chroma problem #46
2018-07-23 17:38:42 +02:00
Sebastian Gniazdowski
eb9b2f030a
*-highlight: Use the supplied $__style, not a wrong hardcoded value
2018-07-23 17:24:54 +02:00
Sebastian Gniazdowski
29b4a0aca6
*-highlight: Correct parentheses and conditions at final next_word-code
2018-07-23 16:02:53 +02:00
Sebastian Gniazdowski
b2ca19b569
*-highlight: Simplify command-separator effect on typeset ... command
2018-07-23 15:45:59 +02:00
Sebastian Gniazdowski
2830b9953b
*-highlight: Faster code for single-word aliases support
...
Issue #47
2018-07-22 08:52:46 +02:00
Sebastian Gniazdowski
2d73b8d401
*-highlight: Recognize aliases that are single-word
...
Issue #47
2018-07-22 08:40:41 +02:00
Sebastian Gniazdowski
19a8a5e8c4
*-highlight: Chromas now support aliases
2018-07-21 18:12:51 +02:00
Sebastian Gniazdowski
dab65767e6
*-highlight: Merge-restore: remove old comments
...
3b2eb33 *-highlight: Small code formatting fix, remove old comments
2018-07-21 15:06:46 +02:00
Sebastian Gniazdowski
637521f28d
*-highlight: Merge-restore: a threshold on # of zle .redisplay calls
...
d74839c *-highlight: Limit # of zle .redisplay calls – this stops blinking
2018-07-21 15:03:48 +02:00
Sebastian Gniazdowski
4163d4d4e1
*-highlight: Merge-restore: optimize four $__arg[1] = ... cases
...
26f2cde *-highlight: Optimized one other $__arg[1] == (using pattern)
Added 3 more cases.
2018-07-21 15:00:42 +02:00
Sebastian Gniazdowski
0f0119563c
*-highlight: Merge-restore: can remove one (Q) dequoting
...
5b5f1ef *-highlight: Found one (Q) to remove, should compensate. Edited comments
2018-07-21 14:56:23 +02:00
Sebastian Gniazdowski
39a4ec6887
*-highlight: Merge-restore: $v = A* is faster than $v[1] = A, tests:
...
typeset -F4 SECONDS=0; repeat 30000; do [[ "$param" = "a"* ]] && param[1]="a"; done; echo $SECONDS
0.0447
typeset -F4 SECONDS=0; repeat 30000; do [[ "${param[1]}" = "a" ]] && param[1]="a"; done; echo $SECONDS
0.0731
e858dfb *-highlight: Replace slower ${a[1]} = \$ with faster $a = \$*. Results:
2018-07-21 14:50:43 +02:00
Sebastian Gniazdowski
99d6b33907
*-highlight: Merge-restore: optimize-out ${var:1} Bash syntax
...
a2afb2d *-highlight: Optimize-out ${v:1} Bash syntax, allow $VAR/then/path/exe
2018-07-21 14:48:09 +02:00
Sebastian Gniazdowski
719c092bb7
*-highlight: Merge-restore: allow $V/cmd, "$V/cmd, "$V/cmd", "${V}/cmd"
...
31f759c *-highlight: Add support for params on command place, "${VAR}/abc", etc.
Extended for $VAR without braces (i.e. not ${VAR}) and for opening-only
double quote.
2018-07-21 14:43:03 +02:00
Sebastian Gniazdowski
026941d9c2
*-highlight: Merge-restore: stack pop in single instruction, not two
...
1de6383 *-highlight,nocmd: Faster stack pop, in one instruction not two
2018-07-21 14:35:26 +02:00
Sebastian Gniazdowski
3467e3d3ca
*-highlight: Merge-restore: more reasonable redirection-detecting code
...
b938de3 *-highlight: Shorter, better code that detects redirection
2018-07-21 14:31:59 +02:00
Sebastian Gniazdowski
00d25ee5c1
*-highlight: Merge-restore: one active_command="$__arg" not needed (?)
2018-07-21 13:56:50 +02:00
Sebastian Gniazdowski
1daa6b3ba4
*-highlight: Merge-restore: simplify ; and \n code short-paths
...
55e7706 *-highlight: Simplify if [[ $__arg == ';' ]] short-path code
2018-07-21 13:55:21 +02:00
Sebastian Gniazdowski
55d65be086
*-highlight: Merge-restore: proc_buf advancement via patterns (not (i))
...
44f83a1 *-higlight: Optimize proc_buf advancement, use pattern in [[
2018-07-21 13:36:24 +02:00
Sebastian Gniazdowski
cc5554602c
*-highlight: Merge-restore: pattern matching to replace (i) flag
...
cec7c2e *assign: Smal optimization, use pattern matching instead of (i) flag
2018-07-21 12:56:53 +02:00
Sebastian Gniazdowski
ea9104542c
*-highlight: typeset' and maybe others can be also reserved' somehow
2018-07-21 12:30:19 +02:00
Sebastian Gniazdowski
e12ab501f2
By default path-checking doesn't use async mode, unless F_H[use_async]=1
...
Issue #30
2018-07-11 17:58:02 +02:00
Sebastian Gniazdowski
ffcfdac648
*-highlight: Workaround for Ctrl-C problems when async-path-checking #30
2018-07-11 10:55:56 +02:00
Sebastian Gniazdowski
55cfdabd00
*-highlight: Mute running of chroma, it will create a fallback operation
2018-07-06 21:08:10 +02:00
Sebastian Gniazdowski
4500583623
Range of no-w-in-zle-F fix is now < 5.0.6 #39
2018-07-04 15:04:07 +02:00
Sebastian Gniazdowski
5fdbef4762
Temporary fix for lack of -w in zle/Zsh < 5.0 #39
2018-07-04 13:11:59 +02:00
Sebastian Gniazdowski
c2dc86035a
*-highlight: Better (faster) method to avoid syntax error #38
2018-07-02 13:21:07 +02:00
Sebastian Gniazdowski
d18543d4bc
Revert "*-highlight: Handle possible syntax error when checking math vars #38 "
...
This reverts commit 8d64d33258 .
2018-07-02 13:19:22 +02:00
Sebastian Gniazdowski
8d64d33258
*-highlight: Handle possible syntax error when checking math vars #38
2018-07-02 12:42:58 +02:00
Sebastian Gniazdowski
37bf4029eb
*-highlight: &&-etc. break out of assignment
2018-06-28 18:20:47 +02:00
Sebastian Gniazdowski
3361bb62d6
*-highlight: Silence `functions -M' stderr to allow re-sourcing #32
2018-06-21 18:35:33 +02:00
Sebastian Gniazdowski
fffda6a665
*-highlighting: Missed places that should use (q) #31
2018-06-18 23:21:54 +02:00
Sebastian Gniazdowski
d24bfe4d71
*-highlight: Path-cache key has $__arg quoted to suppress errors #31
2018-06-18 20:59:11 +02:00
Sebastian Gniazdowski
f2c0769227
*-highlight: switch from exit to return when exiting async function
2018-06-17 22:46:16 +02:00
Sebastian Gniazdowski
cbc35d6198
*-highlight: Disable premature which chroma #29
2018-06-16 18:05:21 +02:00
Sebastian Gniazdowski
523d697021
*-highlight: Skip <() process for zle -F if using *-beginning-search wid
...
Should help #26
2018-06-16 16:23:41 +02:00
Sebastian Gniazdowski
75af13ff5b
*-highlight: async investigation
2018-06-15 18:30:47 +02:00
Sebastian Gniazdowski
f881a78a21
*-higlight: Investigation of async-path checking problem
2018-06-15 17:54:54 +02:00
Sebastian Gniazdowski
f9d10f2f57
*-highlight: Explicitly end background process
2018-06-15 17:27:23 +02:00
Sebastian Gniazdowski
d3b688b370
*-highlight: Disable vim chroma
2018-06-15 08:41:17 +02:00
Sebastian Gniazdowski
5b8004f385
New chroma ruby', works like chroma perl', checks syntax via -ce opts
2018-06-11 09:50:33 +02:00
Sebastian Gniazdowski
ca2e18bbc9
*-highlight: Async path checking has now 8-second cache
2018-06-10 23:22:16 +02:00
Sebastian Gniazdowski
e07146997f
*-highlight: Remove path-exists queue clearing
2018-06-10 23:20:54 +02:00
Sebastian Gniazdowski
5a6684c6b7
*-highlight: Support for asynchronous path checking
2018-06-10 22:18:57 +02:00
Sebastian Gniazdowski
1d7d6f579a
New chroma: `printf', highlights special sequences like %s, %20s, etc.
2018-06-10 18:24:30 +02:00
Sebastian Gniazdowski
5954091d7a
New chroma function `which', queries other similar commands, then prints
2018-06-10 15:29:43 +02:00
Sebastian Gniazdowski
eeae87a5e0
*-highlight: Tmux has -c option just like `sh', can highlight that
2018-06-10 12:02:50 +02:00
Sebastian Gniazdowski
f0be58fb80
New chroma `-scp.ch', tracks if user passes port number to hostspec
2018-06-10 11:50:39 +02:00
Sebastian Gniazdowski
c780ce3770
New chroma `-ssh.ch', tracks if user passes port to hostspec
2018-06-10 11:30:15 +02:00
Sebastian Gniazdowski
85beb720f3
New chroma: -autoload.ch, warns about redefinition of function, etc.
2018-06-10 10:16:50 +02:00
Sebastian Gniazdowski
17a28baad4
New chroma -docker.ch' that verifies image ID passed to image rm'
2018-06-09 20:07:48 +02:00
Sebastian Gniazdowski
73df278dfe
-sh.ch: Attach fish, has -c option, though different syntax, let's try
2018-06-09 17:34:44 +02:00
Sebastian Gniazdowski
22ce1d8c58
-sh.ch,*-highlight: Attach to 2 other shells, Zsh and Bash
2018-06-09 15:21:40 +02:00
Sebastian Gniazdowski
f54e44f325
New chroma -sh.ch', colorizes code passed to sh' with -c option
2018-06-09 14:41:20 +02:00
Sebastian Gniazdowski
6739b8b552
New chroma – `source' to handle . and source builtins
2018-06-09 09:30:07 +02:00
Sebastian Gniazdowski
00c5f8f924
*-highlight: Add comments
2018-06-09 06:28:14 +02:00
Sebastian Gniazdowski
b5241ba180
*-highlight: Much better $( ) recursion, would say problems-free, maybe
2018-06-09 00:23:13 +02:00
Sebastian Gniazdowski
6c6943720f
*-highlight: Larger buffer (110 -> 250) for $( ) matching
2018-06-08 18:31:34 +02:00
Sebastian Gniazdowski
7fbf7cdd98
chroma: New chroma `vim', shows last opened files under prompt
2018-06-08 15:27:17 +02:00
Sebastian Gniazdowski
070077daaf
*-highlight,-example.ch: Rename arg_type -> __arg_type, use it to end
2018-06-08 13:54:05 +02:00
Sebastian Gniazdowski
8ec24ca02f
*-highlight: Missing math function for awk
2018-06-08 09:37:30 +02:00
Sebastian Gniazdowski
9d4f2b597d
New chroma `-awk.ch', colorizes regex characters and a keyword (print)
2018-06-07 22:10:35 +02:00
Sebastian Gniazdowski
f31a2d08a9
New chroma -make.ch, verifies if target is correct
2018-06-07 19:57:40 +02:00
Sebastian Gniazdowski
2201fb6e8d
New -perl.ch chroma, syntax-checks perl code; 2 new theme entries
2018-06-07 18:27:24 +02:00
Sebastian Gniazdowski
4b9598ee1f
*-highlight: Fix bug in math highlight – allow variables starting with _
2018-06-06 21:59:49 +02:00
Sebastian Gniazdowski
708afec209
*-highlight: Fix FAST_BLIST_PATTERNS not expanding path to absolute one
2018-06-06 18:26:10 +02:00
Sebastian Gniazdowski
2852fdd576
-grep.ch (new): Special highlighting for grep – -grep.ch chroma function
2018-06-06 17:07:12 +02:00
Sebastian Gniazdowski
1930d37084
-example.ch: Added example chroma function
2018-06-06 08:42:26 +02:00
Sebastian Gniazdowski
be88850185
Performance status [+] 39+77=116 / -26+24=-2
...
No chroma:
./parse.zsh -oo # 39 ms increase (caused by other commits from last PStatus)
Running time: 2.1572750000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 2139,34 6,11 99,99% 1619,36 4,63 75,68% -fast-highlight-process
2) 3150 417,41 0,13 19,51% 417,41 0,13 19,51% -fast-highlight-string
3) 1400 54,94 0,04 2,57% 54,94 0,04 2,57% -fast-highlight-check-path
4) 1400 47,64 0,03 2,23% 47,64 0,03 2,23% -fast-highlight-main-type
5) 1 0,26 0,26 0,01% 0,26 0,26 0,01% -fast-highlight-fill-option-variables
6) 1 0,03 0,03 0,00% 0,03 0,03 0,00% -fast-highlight-init
./parse.zsh -ooo # -26 increase, i.e. decrease
Running time: 1.1181060000
num calls time self name
-----------------------------------------------------------------------------------
1) 100 1112,04 11,12 99,99% 885,68 8,86 79,63% -fast-highlight-process
2) 900 98,97 0,11 8,90% 98,97 0,11 8,90% -fast-highlight-string
3) 300 78,39 0,26 7,05% 78,39 0,26 7,05% -fast-highlight-math-string
4) 1600 44,72 0,03 4,02% 44,72 0,03 4,02% -fast-highlight-main-type
5) 100 4,29 0,04 0,39% 4,29 0,04 0,39% -fast-highlight-check-path
6) 1 0,14 0,14 0,01% 0,14 0,14 0,01% -fast-highlight-fill-option-variables
7) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -fast-highlight-init
With chroma:
./parse.zsh -oo # 77 ms increase compared to above
Running time: 2.2567730000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 2215,97 6,33 99,99% 1710,59 4,89 77,19% -fast-highlight-process
2) 3150 424,47 0,13 19,15% 424,47 0,13 19,15% -fast-highlight-string
3) 1400 56,89 0,04 2,57% 56,89 0,04 2,57% -fast-highlight-check-path
4) 1400 24,03 0,02 1,08% 24,03 0,02 1,08% -fast-highlight-main-type
5) 1 0,22 0,22 0,01% 0,22 0,22 0,01% -fast-highlight-fill-option-variables
6) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -fast-highlight-init
./parse.zsh -ooo # 24 increase compared to above
Running time: 1.1422620000
num calls time self name
-----------------------------------------------------------------------------------
1) 100 1135,96 11,36 99,98% 911,76 9,12 80,25% -fast-highlight-process
2) 900 98,34 0,11 8,66% 98,34 0,11 8,66% -fast-highlight-string
3) 300 77,94 0,26 6,86% 77,94 0,26 6,86% -fast-highlight-math-string
4) 1600 43,85 0,03 3,86% 43,85 0,03 3,86% -fast-highlight-main-type
5) 100 4,07 0,04 0,36% 4,07 0,04 0,36% -fast-highlight-check-path
6) 1 0,21 0,21 0,02% 0,21 0,21 0,02% -fast-highlight-fill-option-variables
7) 1 0,04 0,04 0,00% 0,04 0,04 0,00% -fast-highlight-init
2018-06-04 22:16:05 +02:00
Sebastian Gniazdowski
0e033f8c97
Experimental chroma support, currently active only on command `git'
2018-06-04 20:20:14 +02:00
Sebastian Gniazdowski
43ae2216ec
*-highlight: Emacs mode-line
2018-06-04 20:03:21 +02:00
Sebastian Gniazdowski
66e9b3c5ed
*-highlight: Detection of $( ) now doesn't go for $(( )) as a candidate
2018-06-04 18:19:24 +02:00
Sebastian Gniazdowski
f54d7702a6
*-highlight: Rename $cur_cmd to $active_command
2018-06-04 16:57:01 +02:00
Sebastian Gniazdowski
3f24e6868f
*-highlight: Make sudo and always-block compatible with `case' handling
2018-06-04 16:33:20 +02:00
Sebastian Gniazdowski
70a7e18a32
fast-theme,*-highlight: 3 new styles for `case' higlighting
2018-06-02 20:37:13 +02:00
Sebastian Gniazdowski
8d90dc2727
*-highlight: Support for `case' highlighting
2018-06-02 19:55:12 +02:00
Sebastian Gniazdowski
10d291cc01
*-highlight: Softer state manipulation, less rigid =1 etc. assignments
2018-06-02 19:51:34 +02:00
Sebastian Gniazdowski
61595076da
*-highlight: Don't highlight closing ) with style `assign'
2018-06-02 19:48:29 +02:00
Sebastian Gniazdowski
1fc2450ab3
*-highlight: One complex math command optimization, top of the loop
2018-06-02 19:47:36 +02:00
Sebastian Gniazdowski
cc49247c9e
*-highlight: Fix improper state after assignment (command | regular)
2018-06-02 19:46:18 +02:00
Sebastian Gniazdowski
df92fedff5
*-highlight: Fix removal of trailing "/' when recursing in eval
2018-06-02 13:42:52 +02:00
Sebastian Gniazdowski
a5ade0e264
*-highlight: Recursive highlighting of eval string argument
2018-06-02 13:08:17 +02:00
Sebastian Gniazdowski
e91847b9d0
*-highlight: Don't recurse when not at main *-process call
2018-06-02 13:07:00 +02:00
Sebastian Gniazdowski
fca8603d0b
*-highlight: Support assignments of arrays when key is taken from array
2018-06-02 09:02:16 +02:00
Sebastian Gniazdowski
5d70f01f97
*-highlight: Math highlighting recognizes ${+VAR}
2018-06-02 08:49:48 +02:00
Sebastian Gniazdowski
c48eb0d415
*-highlight: Math colorizing recognizes variables in braces ${HISTISZE}
2018-06-02 08:47:21 +02:00
Sebastian Gniazdowski
53dd85a7fc
*-highlight: Allow -- for precommand modifiers command & exec
2018-06-02 08:14:56 +02:00
Sebastian Gniazdowski
d9fe110b83
*-highlight: Detect globbing also when `##' occurs
2018-06-02 07:50:56 +02:00
Sebastian Gniazdowski
988d5044b6
themes: Rudimentary (all same) configuration of here-string tokens #9
2018-06-01 22:11:29 +02:00
Sebastian Gniazdowski
99842d2a45
fast-theme,*-highlight: Support for here-string, can use bg color #9
2018-06-01 22:06:53 +02:00
Sebastian Gniazdowski
f7ee5e2546
fast-theme,*-highlight: Support highlighting of {FD} etc. passed to exec
2018-06-01 19:56:33 +02:00
Sebastian Gniazdowski
e5c5534199
*-highlight: Proper states for precmd (command,exec) option handling
2018-06-01 18:56:53 +02:00
Sebastian Gniazdowski
b39996edf3
*-highlight: Switch theme to secondary when descending into $() #15
2018-06-01 15:08:13 +02:00
Sebastian Gniazdowski
6dd3bd34d0
*-highlight: Support for multiple active themes #15
2018-06-01 15:01:24 +02:00
Sebastian Gniazdowski
8a32944433
*-highlight: Fix "$() found?" comparison
2018-06-01 14:04:54 +02:00
Sebastian Gniazdowski
3651605a8e
*-highlight: Significant change: the parser is called recursively on $()
...
Issue #15
2018-06-01 11:22:57 +02:00
Sebastian Gniazdowski
882d88b047
test,*-highlight: New -ooo performance test; highlighter takes arguments
...
./parse.zsh -ooo
Running time: 1.0340360000
num calls time self name
-----------------------------------------------------------------------------------
1) 100 1028,39 10,28 99,99% 810,06 8,10 78,76% -fast-highlight-process
2) 900 95,68 0,11 9,30% 95,68 0,11 9,30% -fast-highlight-string
3) 300 73,96 0,25 7,19% 73,96 0,25 7,19% -fast-highlight-math-string
4) 1600 44,58 0,03 4,33% 44,58 0,03 4,33% -fast-highlight-main-type
5) 100 4,11 0,04 0,40% 4,11 0,04 0,40% -fast-highlight-check-path
6) 1 0,13 0,13 0,01% 0,13 0,13 0,01% -fast-highlight-fill-option-variables
7) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -fast-highlight-init
./parse.zsh -oo
Running time: 1.9389050000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1922,21 5,49 99,99% 1436,05 4,10 74,70% -fast-highlight-process
2) 3150 407,79 0,13 21,21% 407,79 0,13 21,21% -fast-highlight-string
3) 1400 54,71 0,04 2,85% 54,71 0,04 2,85% -fast-highlight-check-path
4) 1400 23,66 0,02 1,23% 23,66 0,02 1,23% -fast-highlight-main-type
5) 1 0,14 0,14 0,01% 0,14 0,14 0,01% -fast-highlight-fill-option-variables
6) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -fast-highlight-init
2018-05-31 12:40:14 +02:00
Sebastian Gniazdowski
5ba1178afe
*-highlight: Optimization - compute __arg length once
...
./parse.zsh -oo
Running time: 1.9427760000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1925,87 5,50 99,99% 1438,99 4,11 74,71% -fast-highlight-process
2) 3150 408,18 0,13 21,19% 408,18 0,13 21,19% -fast-highlight-string
3) 1400 54,72 0,04 2,84% 54,72 0,04 2,84% -fast-highlight-check-path
4) 1400 23,98 0,02 1,24% 23,98 0,02 1,24% -fast-highlight-main-type
5) 1 0,21 0,21 0,01% 0,21 0,21 0,01% -fast-highlight-fill-option-variables
6) 1 0,03 0,03 0,00% 0,03 0,03 0,00% -fast-highlight-init
There was spark of 1914 when __asize was local not integer.
2018-05-31 12:19:22 +02:00
Sebastian Gniazdowski
b2a0126663
*-highlight: Allow multiple separate options for command', exec' ( #10 )
2018-05-30 18:53:46 +02:00
Sebastian Gniazdowski
5804e9a79d
*-highlight: Correct state after option for precommand ( #10 )
2018-05-30 18:49:51 +02:00
Sebastian Gniazdowski
1247b648cb
*-highlight: Simpler and more accurate option-testing for exec, command ( #10 )
2018-05-30 18:27:18 +02:00
Sebastian Gniazdowski
d87fed48eb
*-highlight: Correctly highlight options for command' and exec' ( #10 )
2018-05-30 18:22:34 +02:00
Sebastian Gniazdowski
8c3e75ea5e
*-highlight: Double-hyphen (--) stops option recognition and colorizing
2018-05-30 17:49:13 +02:00
Sebastian Gniazdowski
1c5a56c04f
*-highlight: Support ${VAR} at command position (not only $VAR)
2018-05-30 14:28:12 +02:00
Sebastian Gniazdowski
1bb701f34f
*-highlight: Move $variable highlighting from case to if-block
...
Current performance: ./parse.zsh -oo
Running time: 1.9366030000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 1921,83 5,49 99,99% 1421,76 4,06 73,97% -fast-highlight-process
2) 3150 421,38 0,13 21,92% 421,38 0,13 21,92% -fast-highlight-string
3) 1400 55,26 0,04 2,87% 55,26 0,04 2,87% -fast-highlight-check-path
4) 1400 23,43 0,02 1,22% 23,43 0,02 1,22% -fast-highlight-main-type
5) 1 0,14 0,14 0,01% 0,14 0,14 0,01% -fast-highlight-fill-option-variables
6) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -fast-highlight-init
./parse.zsh -o
Running time: 0.6343880000
num calls time self name
-----------------------------------------------------------------------------------
1) 350 622,28 1,78 99,98% 544,78 1,56 87,53% -fast-highlight-process
2) 950 34,05 0,04 5,47% 34,05 0,04 5,47% -fast-highlight-main-type
3) 700 26,97 0,04 4,33% 26,97 0,04 4,33% -fast-highlight-check-path
4) 350 16,49 0,05 2,65% 16,49 0,05 2,65% -fast-highlight-string
5) 1 0,12 0,12 0,02% 0,12 0,12 0,02% -fast-highlight-fill-option-variables
6) 1 0,02 0,02 0,00% 0,02 0,02 0,00% -fast-highlight-init
2018-05-29 13:07:46 +02:00
Sebastian Gniazdowski
b8413e93e7
*-highlight: For-loop highlighting, working, needs few upgrades
2018-05-29 12:25:40 +02:00
Sebastian Gniazdowski
7bec6e5782
*-highlight: Three more simple vs. complex math operation optimizations
2018-05-28 11:28:36 +02:00
Sebastian Gniazdowski
baae683724
*-highlight: Optimise complex math command into single one with & and ~
2018-05-27 17:22:30 +02:00
Sebastian Gniazdowski
2dc3103fce
*-highlight: Optimise complex math command into single one with & and ~
2018-05-27 17:14:55 +02:00
Sebastian Gniazdowski
d3a7922f5f
*-highlight: Fix in_array_assignment setting when closing ) found
2018-05-26 13:00:38 +02:00
Sebastian Gniazdowski
796c482c76
*-highlight: Make parameters' names exotic blank-var detection to work
2018-05-26 12:54:42 +02:00
Sebastian Gniazdowski
d2129452bd
*-highlight,plugin.zsh,default.ini: Uplift of fg=112-fix code
2018-05-26 07:57:43 +02:00
Sebastian Gniazdowski
ee56f65641
*-highlight,plugin.zsh: Final fix for fg=112 assignment – use zstyle
2018-05-26 07:14:24 +02:00
Sebastian Gniazdowski
52307fbff4
Theme support, 1 extra theme – `safari'
2018-05-25 23:25:57 +02:00
Sebastian Gniazdowski
41df55bb2b
*-highlight: (k) subscript flag is sufficient, no need for (K)
2018-05-25 19:50:34 +02:00
Sebastian Gniazdowski
a580cff2a5
*-highlight: FAST_BLIST_PATTERNS
2018-05-25 17:15:20 +02:00
Sebastian Gniazdowski
c34716ccb1
*-highlight: Highlighting for zcalc
2018-05-23 16:02:36 +02:00