aboutsummaryrefslogtreecommitdiffhomepage
path: root/fish.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fish.cpp')
-rw-r--r--fish.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/fish.cpp b/fish.cpp
index 5e8c6b62..baf8a774 100644
--- a/fish.cpp
+++ b/fish.cpp
@@ -216,8 +216,10 @@ static struct config_paths_t determine_config_directory_paths(const char *argv0)
static int read_init(const struct config_paths_t &paths)
{
parser_t &parser = parser_t::principal_parser();
- parser.eval( L"builtin . " + paths.data + L"/config.fish 2>/dev/null", 0, TOP );
- parser.eval( L"builtin . " + paths.sysconf + L"/config.fish 2>/dev/null", 0, TOP );
+ const io_chain_t empty_ios;
+ parser.eval( L"builtin . " + paths.data + L"/config.fish 2>/dev/null", empty_ios, TOP );
+ parser.eval( L"builtin . " + paths.sysconf + L"/config.fish 2>/dev/null", empty_ios, TOP );
+
/*
We need to get the configuration directory before we can source the user configuration file
@@ -232,7 +234,7 @@ static int read_init(const struct config_paths_t &paths)
{
wcstring config_dir_escaped = escape_string( config_dir, 1 );
wcstring eval_buff = format_string(L"builtin . %ls/config.fish 2>/dev/null", config_dir_escaped.c_str());
- parser.eval( eval_buff, 0, TOP );
+ parser.eval( eval_buff, empty_ios, TOP );
}
return 1;
@@ -453,12 +455,13 @@ int main( int argc, char **argv )
if (g_log_forks)
printf("%d: g_fork_count: %d\n", __LINE__, g_fork_count);
+ const io_chain_t empty_ios;
if( read_init(paths) )
{
if( cmd != 0 )
{
wchar_t *cmd_wcs = str2wcs( cmd );
- res = parser.eval( cmd_wcs, 0, TOP );
+ res = parser.eval( cmd_wcs, empty_ios, TOP );
free(cmd_wcs);
reader_exit(0, 0);
}
@@ -466,7 +469,7 @@ int main( int argc, char **argv )
{
if( my_optind == argc )
{
- res = reader_read( STDIN_FILENO, 0 );
+ res = reader_read( STDIN_FILENO, empty_ios );
}
else
{
@@ -511,7 +514,7 @@ int main( int argc, char **argv )
free( rel_filename );
free( abs_filename );
- res = reader_read( fd, 0 );
+ res = reader_read( fd, empty_ios );
if( res )
{