diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-05-08 15:57:56 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-05-14 20:38:32 -0700 |
commit | 51468b764689e7d724a87e6c2b8cdb4e599a3604 (patch) | |
tree | 75fe13dbad791e0d143a3610bfe7ed7d0136ad38 /tests/function.out | |
parent | ff1d651415a2752e82ec417294f9bdf8c234c10f (diff) |
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
Diffstat (limited to 'tests/function.out')
-rw-r--r-- | tests/function.out | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/function.out b/tests/function.out index 5a3da619..0d12479e 100644 --- a/tests/function.out +++ b/tests/function.out @@ -22,3 +22,4 @@ Function name1 found Function name2 found Function name3 found Function name4 found +"function pwd --shadow-builtin" worked |