fish-shell/src
Kurtis Rader 51468b7646 add function --shadow-builtin flag
It's currently too easy for someone to bork their shell by doing something
like `function test; return 0; end`. That's obviously a silly, contrived,
example but the point is that novice users who learn about functions are
prone to do something like that without realizing it will bork the shell. Even
expert users who know about the `test` builtin might forget that, say, `pwd`
is a builtin.

This change adds a `--shadow-builtin` flag that must be specified to
indicate you know what you're doing.

Fixes #3000
2016-05-14 20:38:32 -07:00
..
autoload.cpp restyle switch blocks to match project style 2016-05-03 17:14:56 -07:00
autoload.h restyle switch blocks to match project style 2016-05-03 17:14:56 -07:00
builtin_commandline.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
builtin_commandline.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_complete.cpp restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_complete.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_jobs.cpp restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_jobs.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_printf.cpp restyle switch blocks to match project style 2016-05-03 17:14:56 -07:00
builtin_printf.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_set_color.cpp Remove some unused macros from builtin_set_color.cpp 2016-04-29 14:54:21 -07:00
builtin_set_color.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_set.cpp restyle switch blocks to match project style 2016-05-03 17:14:56 -07:00
builtin_set.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_string.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
builtin_string.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_test.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
builtin_test.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_ulimit.cpp restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin_ulimit.h restyle builtin modules to match project style 2016-04-26 21:58:59 -07:00
builtin.cpp add function --shadow-builtin flag 2016-05-14 20:38:32 -07:00
builtin.h add function --shadow-builtin flag 2016-05-14 20:38:32 -07:00
color.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
color.h restyle color module to match project style 2016-04-27 16:06:03 -07:00
common.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
common.h restyle common module to match project style 2016-04-27 17:08:25 -07:00
complete.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
complete.h restyle switch blocks to match project style 2016-05-03 17:14:56 -07:00
env_universal_common.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
env_universal_common.h restyle env_universal module to match project style 2016-04-28 19:17:28 -07:00
env.cpp fix fork debug printf() calls 2016-05-05 20:22:20 -07:00
env.h fix fork debug printf() calls 2016-05-05 20:22:20 -07:00
event.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
event.h retyle event module to match project style 2016-04-28 19:39:41 -07:00
exec.cpp add function --shadow-builtin flag 2016-05-14 20:38:32 -07:00
exec.h restyle exec module to match project style 2016-04-28 20:07:00 -07:00
expand.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
expand.h restyle expand module to match project style 2016-04-28 20:33:27 -07:00
fallback.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
fallback.h add missing fallback declarations 2016-05-03 19:15:27 -07:00
fish_indent.cpp restyle fish modules to match project style 2016-04-30 19:52:13 -07:00
fish_key_reader.cpp enhance the key_reader program 2016-05-10 14:11:30 -07:00
fish_tests.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
fish_version.cpp restyle fish modules to match project style 2016-04-30 19:52:13 -07:00
fish_version.h restyle fish modules to match project style 2016-04-30 19:52:13 -07:00
fish.cpp fix fork debug printf() calls 2016-05-05 20:22:20 -07:00
function.cpp add function --shadow-builtin flag 2016-05-14 20:38:32 -07:00
function.h add function --shadow-builtin flag 2016-05-14 20:38:32 -07:00
highlight.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
highlight.h restyle highlight module to match project style 2016-04-30 21:10:23 -07:00
history.cpp lint: low hanging fruit in history.cpp 2016-05-05 15:09:31 -07:00
history.h lint: low hanging fruit in history.cpp 2016-05-05 15:09:31 -07:00
input_common.cpp enhance the key_reader program 2016-05-10 14:11:30 -07:00
input_common.h enhance the key_reader program 2016-05-10 14:11:30 -07:00
input.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
input.h restyle input module to match project style 2016-04-30 21:46:56 -07:00
intern.cpp restyle intern module to match project style 2016-05-01 20:28:46 -07:00
intern.h restyle intern module to match project style 2016-05-01 20:28:46 -07:00
io.cpp restyle io module to match project style 2016-05-01 20:38:19 -07:00
io.h restyle io module to match project style 2016-05-01 20:38:19 -07:00
iothread.cpp restyle iothread module to match project style 2016-05-01 21:54:54 -07:00
iothread.h restyle iothread module to match project style 2016-05-01 21:54:54 -07:00
kill.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
kill.h restyle kill module to match project style 2016-05-01 22:18:59 -07:00
lru.h restyle pager & lru module to match project style 2016-05-02 12:11:57 -07:00
output.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
output.h restyle output module to match project style 2016-05-01 22:36:29 -07:00
pager.cpp restyle switch blocks to match project style 2016-05-03 17:14:56 -07:00
pager.h restyle pager & lru module to match project style 2016-05-02 12:11:57 -07:00
parse_constants.h restyle parser module to match project style 2016-05-02 19:24:52 -07:00
parse_execution.cpp add function --shadow-builtin flag 2016-05-14 20:38:32 -07:00
parse_execution.h restyle parse_execution module to match project style 2016-05-02 13:00:03 -07:00
parse_productions.cpp restyle parse_productions module to match project style 2016-05-02 16:03:37 -07:00
parse_productions.h restyle parse_productions module to match project style 2016-05-02 16:03:37 -07:00
parse_tree.cpp rename get_is_interactive and remove stupid test 2016-05-14 20:35:54 -07:00
parse_tree.h restyle parse_tree module to match project style 2016-05-02 16:44:27 -07:00
parse_util.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
parse_util.h restyle parse_util module to match project style 2016-05-02 17:11:02 -07:00
parser_keywords.cpp restyle parser module to match project style 2016-05-02 19:24:52 -07:00
parser_keywords.h restyle parser module to match project style 2016-05-02 19:24:52 -07:00
parser.cpp rename get_is_interactive and remove stupid test 2016-05-14 20:35:54 -07:00
parser.h restyle parser module to match project style 2016-05-02 19:24:52 -07:00
path.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
path.h restyle path module to match project style 2016-05-02 21:23:33 -07:00
postfork.cpp restyle postfork module to match project style 2016-05-02 21:34:26 -07:00
postfork.h restyle postfork module to match project style 2016-05-02 21:34:26 -07:00
print_help.cpp restyle proc module to match project style 2016-05-02 22:07:58 -07:00
print_help.h restyle proc module to match project style 2016-05-02 22:07:58 -07:00
proc.cpp rename get_is_interactive and remove stupid test 2016-05-14 20:35:54 -07:00
proc.h rename get_is_interactive and remove stupid test 2016-05-14 20:35:54 -07:00
reader.cpp rename get_is_interactive and remove stupid test 2016-05-14 20:35:54 -07:00
reader.h lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
sanity.cpp rename get_is_interactive and remove stupid test 2016-05-14 20:35:54 -07:00
sanity.h restyle sanity & screen module to match project style 2016-05-03 12:53:54 -07:00
screen.cpp lint: screen.cpp low hanging fruit 2016-05-04 18:14:04 -07:00
screen.h lint: screen.cpp low hanging fruit 2016-05-04 18:14:04 -07:00
signal.cpp rename get_is_interactive and remove stupid test 2016-05-14 20:35:54 -07:00
signal.h restyle signal module to match project style 2016-05-03 13:06:45 -07:00
tokenizer.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
tokenizer.h restyle tokenizer module to match project style 2016-05-03 15:00:44 -07:00
utf8.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
utf8.h restyle utf8 module to match project style 2016-05-03 15:12:19 -07:00
util.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
util.h restyle remaining modules to match project style 2016-05-03 16:09:45 -07:00
wcstringutil.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
wcstringutil.h restyle remaining modules to match project style 2016-05-03 16:09:45 -07:00
wgetopt.cpp restyle switch blocks to match project style 2016-05-03 17:14:56 -07:00
wgetopt.h restyle switch blocks to match project style 2016-05-03 17:14:56 -07:00
wildcard.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
wildcard.h restyle remaining modules to match project style 2016-05-03 16:09:45 -07:00
wutil.cpp lint cleanup: eliminate "redundant" errors 2016-05-04 15:32:04 -07:00
wutil.h restyle remaining modules to match project style 2016-05-03 16:09:45 -07:00