diff --git a/builtin.c b/builtin.c index 52f5c65a7..e54c25d11 100644 --- a/builtin.c +++ b/builtin.c @@ -2084,29 +2084,6 @@ static int builtin_status( wchar_t **argv ) } -/** - The eval builtin. Concatenates the arguments and calls eval on the - result. -*/ -static int builtin_eval( wchar_t **argv ) -{ - string_buffer_t sb; - int i; - int argc = builtin_count_args( argv ); - sb_init( &sb ); - - for( i=1; ieval [COMMANDS...] \subsection eval-description Description -The eval builtin causes fish to evaluate the specified parameters as a command. If more than one parameter is specified, all parameters will be joined using a space character as a separator. +The eval function causes fish to evaluate the specified parameters as a command. If more than one parameter is specified, all parameters will be joined using a space character as a separator. \subsection eval-example Example diff --git a/share/functions/eval.fish b/share/functions/eval.fish new file mode 100644 index 000000000..a8a8897da --- /dev/null +++ b/share/functions/eval.fish @@ -0,0 +1,4 @@ + +function eval -d "Evaluate parameters as a command" + echo -n $argv | . +end