fish-shell/src
Fabian Homborg ed9268f99c
math: Make function parentheses optional (#7877)
* math: Make function parentheses optional

It's a bit annoying to use parentheses here because that requires
quoting or escaping.

This allows the parens to be omitted, so

math sin pi

is the same as

math 'sin(pi)'

Function calls have the lowest precedence, so

math sin 2 + 6

is the same as

math 'sin(2 + 6)'

* Add more tests

* Add a note to the docs

* even moar docs

Moar docca

* moar tests

Call me Nikola Testla
2021-03-30 17:21:28 +02:00
..
widecharwidth
ast.cpp Also allow unclosed quotes in some places 2021-02-09 22:38:16 +01:00
ast.h Reformat 2020-11-22 14:39:48 +01:00
ast_node_types.inc
autoload.cpp Don't eagerly fetch the current time in autoloading 2020-08-08 15:30:04 -07:00
autoload.h
builtin.cpp Rework null terminated arrays 2021-03-28 15:31:25 -07:00
builtin.h Remove unused COMMAND_NOT_BUILTIN enum 2021-03-28 22:19:36 -07:00
builtin_argparse.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_argparse.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_bg.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_bg.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_bind.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_bind.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_block.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_block.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_builtin.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_builtin.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_cd.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_cd.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_command.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_command.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_commandline.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_commandline.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_complete.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_complete.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_contains.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_contains.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_disown.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_disown.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_echo.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_echo.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_emit.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_emit.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_eval.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_eval.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_exit.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_exit.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_fg.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_fg.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_function.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_function.h Reformat 2020-11-22 14:39:48 +01:00
builtin_functions.cpp functions: Add "--no-details" flag and use it in funced 2021-03-30 16:54:26 +02:00
builtin_functions.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_history.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_history.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_jobs.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_jobs.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_math.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_math.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_printf.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_printf.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_pwd.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_pwd.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_random.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_random.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_read.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_read.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_realpath.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_realpath.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_return.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_return.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_set.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_set.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_set_color.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_set_color.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_source.cpp Rework null terminated arrays 2021-03-28 15:31:25 -07:00
builtin_source.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_status.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_status.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_string.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_string.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_test.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_test.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_type.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_type.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_ulimit.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_ulimit.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_wait.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
builtin_wait.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
color.cpp Refactor color.h/color.cpp 2021-02-08 15:16:21 -06:00
color.h Refactor color.h/color.cpp 2021-02-08 15:16:21 -06:00
common.cpp Misc cleanups 2021-03-21 19:41:36 +01:00
common.h Rationalize exit codes for failed execs 2021-03-27 21:37:46 -07:00
complete.cpp Fix wrapping for cd (#7843) 2021-03-21 09:27:19 +01:00
complete.h Allow specifying a limit on number of expansion in operation_context 2020-12-22 12:38:51 -08:00
enum_set.h
env.cpp Don't touch $SHLVL if not interactive 2021-03-29 17:44:13 +02:00
env.h Rework null terminated arrays 2021-03-28 15:31:25 -07:00
env_dispatch.cpp Ignore intentional redundant move under GCC 2021-02-22 15:55:40 -06:00
env_dispatch.h Declare functions in headers or use internal linkage (static) 2020-09-08 22:44:03 +02:00
env_universal_common.cpp Disable SIGIO notifier 2021-03-03 22:26:28 +01:00
env_universal_common.h Migrate autoclose_fd_t to new file fds.h 2021-02-05 17:58:08 -08:00
event.cpp Optimize pruning of job/proc exit handlers 2021-03-05 22:40:06 -06:00
event.h
exec.cpp Don't touch $SHLVL if not interactive 2021-03-29 17:44:13 +02:00
exec.h Move autoclose_pipes_t from io.h to fds.h 2021-02-05 17:58:08 -08:00
expand.cpp builtin set: make slice index range optional, like in slice expansion 2021-01-28 07:19:38 +01:00
expand.h Stop expanding globs in command position when performing error checking 2020-12-22 12:38:51 -08:00
fallback.cpp Declare functions in headers or use internal linkage (static) 2020-09-08 22:44:03 +02:00
fallback.h
fd_monitor.cpp fd_monitor: Explicity include <thread> 2021-03-02 15:27:13 +01:00
fd_monitor.h Use fd_event_signaller_t in fd_monitor_t 2021-02-07 10:59:10 -08:00
fds.cpp Fix build on Solaris (and hopefully OpenIndiana) 2021-02-23 11:02:55 -06:00
fds.h Add fd_event_signaller_t 2021-02-07 10:59:10 -08:00
fish.cpp Bravely set job control to full at startup 2021-03-26 19:32:14 +01:00
fish_indent.cpp fish_indent: fix extra indent of continuation lines inside blocks 2021-02-16 18:39:03 +01:00
fish_key_reader.cpp Fix comparison warnings on UTF-16 platforms 2021-02-22 15:03:49 -06:00
fish_test_helper.cpp Restyle codebase 2020-12-06 15:39:54 +01:00
fish_tests.cpp Fix backward-kill-path-component erasing extra tokens (#7872) 2021-03-29 22:58:50 +02:00
fish_version.cpp
fish_version.h
flog.cpp
flog.h Reformat 2020-11-22 14:39:48 +01:00
function.cpp Stop using env_var_t::to_list in a few places 2020-12-15 15:47:44 +01:00
function.h Move functions_def to function.cpp 2020-09-21 17:44:58 +02:00
future_feature_flags.cpp Use const_strlen in a few different places 2021-02-08 15:16:21 -06:00
future_feature_flags.h Fix a tsan warning in features_t 2021-01-08 19:36:56 -08:00
global_safety.h Reformat 2020-11-22 14:39:48 +01:00
highlight.cpp Skip long arguments in syntax highlighting path detection 2021-03-21 16:59:22 -07:00
highlight.h Highlight keywords differently 2021-02-07 21:18:51 +01:00
history.cpp history: Improve bash import check 2021-03-28 20:30:37 +02:00
history.h Pass some parameters by reference/move 2021-03-21 19:41:36 +01:00
history_file.cpp Reverse const_strlen() recursion logic 2021-02-17 12:26:40 -06:00
history_file.h
input.cpp Correct handling of SGR mouse tracking events 2021-02-17 15:45:35 -06:00
input.h Reduce input latency searching for readline function mappings 2021-02-08 15:16:20 -06:00
input_common.cpp Use fd_event_signaller in iothread completions 2021-02-07 10:59:10 -08:00
input_common.h Recognize and disable mouse-tracking CSI events 2021-02-06 17:22:59 -06:00
intern.cpp Declare functions in headers or use internal linkage (static) 2020-09-08 22:44:03 +02:00
intern.h
io.cpp io_buffer_t to store a promise, not a future, to satisfy TSan 2021-02-06 13:28:01 -08:00
io.h builtins to allow stdin to be closed 2021-02-10 17:43:10 -08:00
iothread.cpp Simplify main thread requests 2021-03-28 15:31:25 -07:00
iothread.h Simplify main thread requests 2021-03-28 15:31:25 -07:00
job_group.cpp Implement cancel groups 2020-09-03 11:01:27 -07:00
job_group.h Implement cancel groups 2020-09-03 11:01:27 -07:00
kill.cpp Declare functions in headers or use internal linkage (static) 2020-09-08 22:44:03 +02:00
kill.h
lru.h Use unordered_map instead of map in lru 2020-08-08 15:32:06 -07:00
maybe.h Clean up some unnecessary variable names in maybe.h 2020-12-19 16:10:40 -08:00
null_terminated_array.cpp Rework null terminated arrays 2021-03-28 15:31:25 -07:00
null_terminated_array.h Rework null terminated arrays 2021-03-28 15:31:25 -07:00
operation_context.cpp Allow specifying a limit on number of expansion in operation_context 2020-12-22 12:38:51 -08:00
operation_context.h Expand more when performing history path detection 2021-01-08 12:58:34 -08:00
output.cpp output: A background is set if it's not a special non-color 2021-03-09 13:25:00 +01:00
output.h Use wcs2string when outputting the screen 2021-02-17 15:38:46 -08:00
pager.cpp Revert "Attempt to simplify how completions get presented in the pager" 2020-12-04 16:44:48 +01:00
pager.h Revert "Attempt to simplify how completions get presented in the pager" 2020-12-04 16:44:48 +01:00
parse_constants.h Introduce expansion limits 2020-12-05 13:19:07 -08:00
parse_execution.cpp Revert "Prevent redirecting internal processes to file descriptors above 2" 2021-03-03 22:26:33 +01:00
parse_execution.h Revert "Prevent redirecting internal processes to file descriptors above 2" 2021-03-03 22:26:33 +01:00
parse_tree.cpp Output human-readable descriptions of some parse errors 2021-02-09 22:38:16 +01:00
parse_tree.h
parse_util.cpp Switch builtin execution to the performer model 2021-03-28 15:31:25 -07:00
parse_util.h Rework null terminated arrays 2021-03-28 15:31:25 -07:00
parser.cpp Add a separate --profile-startup option to profile startup 2021-01-29 20:46:34 +01:00
parser.h Add a separate --profile-startup option to profile startup 2021-01-29 20:46:34 +01:00
parser_keywords.cpp Add string to reserved keywords 2020-12-06 15:39:49 +01:00
parser_keywords.h
path.cpp cd first, ask questions later (#7586) 2021-03-27 18:28:03 +01:00
path.h cd first, ask questions later (#7586) 2021-03-27 18:28:03 +01:00
postfork.cpp Clean up and relnote shebangless script support 2021-03-27 16:08:42 -07:00
postfork.h Correct reporting of setpgid (parent vs child) 2020-11-20 14:22:42 -06:00
print_help.cpp
print_help.h
proc.cpp Rationalize exit codes for failed execs 2021-03-27 21:37:46 -07:00
proc.h Rework null terminated arrays 2021-03-28 15:31:25 -07:00
reader.cpp Update BEL comment 2021-03-29 18:03:36 +02:00
reader.h Re-read terminal modes after config.fish 2021-03-07 11:23:59 +01:00
redirection.cpp
redirection.h
sanity.cpp
sanity.h
screen.cpp Revert "Stop caching line breaks in the prompt calculation" 2020-11-12 10:55:11 -08:00
screen.h Revert "Stop caching line breaks in the prompt calculation" 2020-11-12 10:55:11 -08:00
signal.cpp Use const_strlen in a few different places 2021-02-08 15:16:21 -06:00
signal.h Remove use of POLL_IN in SIGIO uvar notifier 2020-10-25 14:52:37 -07:00
termsize.cpp Include <termios.h> instead of <sys/termios.h>. 2021-03-02 12:05:07 +01:00
termsize.h
timer.cpp Pass some parameters by reference/move 2021-03-21 19:41:36 +01:00
timer.h Pass some parameters by reference/move 2021-03-21 19:41:36 +01:00
tinyexpr.cpp math: Make function parentheses optional (#7877) 2021-03-30 17:21:28 +02:00
tinyexpr.h math: Use wchar 2020-12-14 22:54:53 +01:00
tokenizer.cpp Fix backward-kill-path-component erasing extra tokens (#7872) 2021-03-29 22:58:50 +02:00
tokenizer.h Separate out variable assignments when completing 2020-09-26 17:30:25 -07:00
topic_monitor.cpp Unify thread sanitizer detection 2021-02-07 10:59:10 -08:00
topic_monitor.h Correct a stale comment 2020-08-24 12:12:10 -07:00
trace.cpp Change fish_trace prefix to "->" instead of plusses 2020-12-11 21:24:33 +01:00
trace.h
utf8.cpp
utf8.h
util.cpp
util.h
wcstringutil.cpp Factor out count_preceding_backslashes 2021-01-30 16:20:20 -08:00
wcstringutil.h Factor out count_preceding_backslashes 2021-01-30 16:20:20 -08:00
wgetopt.cpp Make arguments to builtins const 2021-03-28 15:31:25 -07:00
wgetopt.h Make arguments to builtins const 2021-03-28 15:31:25 -07:00
wildcard.cpp Allow ** glob segments to match zero directories 2020-12-28 23:51:18 -08:00
wildcard.h Clean up some comments around wildcard expansion 2020-12-28 23:51:18 -08:00
wutil.cpp Reimplement wbasename and wdirname 2021-03-21 16:33:04 -07:00
wutil.h Reimplement wbasename and wdirname 2021-03-21 16:33:04 -07:00