undef

Usage

undef expression

Aliases

undefine

Description

This command can be used to undefine previously defined XSH subroutines. The expression is evaluated as a Perl regular expression. All subroutines whose names match are undefined. Note, that like def, all undef commands are processed during the compilation of the source code, not at run-time, so it doesn't matter how deep in the code is a undef command nested.

xsh> include my_defs.xsh
xsh> call my_sub1 //foo;
xsh> call my_sub2 //bar;
xsh> undefine 'my_sub.*'
xsh> # change/edit the definitions in my_defs.xsh and reload
xsh> include my_defs.xsh