Make sure that io redirections are respected by the '.' builtin. This was not the case earlier, which caused various bugs, especially after eval was made into a function that internally used '.'

darcs-hash:20070425183002-ac50b-d7d93e3b74e7274fe3e0aad98e95dd608bb903ae.gz
This commit is contained in:
axel
2007-04-26 04:30:02 +10:00
parent 784c5d9fa3
commit d0585befb3
6 changed files with 23 additions and 13 deletions

View File

@@ -2933,7 +2933,7 @@ wchar_t *reader_readline()
the prompt, using syntax highlighting. This is used for reading
scripts and init files.
*/
static int read_ni( int fd )
static int read_ni( int fd, io_data_t *io )
{
FILE *in_stream;
wchar_t *buff=0;
@@ -2996,7 +2996,7 @@ static int read_ni( int fd )
if( !parser_test( str, 0, &sb, L"fish" ) )
{
eval( str, 0, TOP );
eval( str, io, TOP );
}
else
{
@@ -3035,7 +3035,7 @@ static int read_ni( int fd )
return res;
}
int reader_read( int fd )
int reader_read( int fd, io_data_t *io )
{
int res;
@@ -3047,7 +3047,7 @@ int reader_read( int fd )
proc_push_interactive( ((fd == 0) && isatty(STDIN_FILENO)));
res= is_interactive?read_i():read_ni( fd );
res= is_interactive?read_i():read_ni( fd, io );
/*
If the exit command was called in a script, only exit the