fish-shell/tests/function.out
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

26 lines
344 B
Plaintext

Testing -V
$foo: (1)
1: 'local foo'
$bar: (5)
1: 'one'
2: 'two 2'
3: ' '
4: ''
5: '3'
$baz: (0)
Testing -V with changed variables
$foo: (1)
1: 'local foo'
$bar: (5)
1: 'one'
2: 'two 2'
3: ' '
4: ''
5: '3'
$baz: (0)
Function name1 found
Function name2 found
Function name3 found
Function name4 found
"function pwd --shadow-builtin" worked