mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
81dd4a4536
Prior to this fix, a "bare variable" in math like 'x + 1' would be looked up in the environment, i.e. equivalent to '$x + 1'. This appears to have been done for performance. However this breaks the orthogonality of fish; performance is not a sufficient justification to give math this level of built-in power, especially because the performance of math is not a bottleneck. The implementation is also ugly. Remove this feature so that variables must be prefixed with the dollar sign and undergo normal variable expansion. Reading 'git grep' output does not show any uses of this in fish functions or completions. Also added to changelog. Fixes #4393
24 lines
183 B
Text
24 lines
183 B
Text
|
|
####################
|
|
# Validate basic expressions
|
|
1
|
|
1
|
|
1
|
|
1.667
|
|
4
|
|
4
|
|
2
|
|
0.500000
|
|
49
|
|
0
|
|
4
|
|
-10
|
|
-2
|
|
-8
|
|
|
|
####################
|
|
# Validate how variables in an expression are handled
|
|
1
|
|
2
|
|
-4
|
|
-4.5
|