aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-03-10 23:38:09 +1000
committerGravatar axel <axel@liljencrantz.se>2006-03-10 23:38:09 +1000
commit32b531667aa1e7f085b8316ffd5c8df7f6b3987c (patch)
tree154a49403412d633d396390b447dbd97001f51dd /main.c
parentc47dae77a4a6c4789fc730d471502bcebdcb8c76 (diff)
Fix bug that causing terminal corruption if a job is put under job control before running in interactive mode. This is fixed by doing more inits at startup (but only slightly more)
darcs-hash:20060310133809-ac50b-d31cd7bab1a3a58de2833f73735817a3d0b3ed7d.gz
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.c b/main.c
index 8e9dac8e..9e0b90bc 100644
--- a/main.c
+++ b/main.c
@@ -62,6 +62,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "translate.h"
#include "halloc_util.h"
+
/**
Parse init files
*/
@@ -69,7 +70,7 @@ static int read_init()
{
char cwd[4096];
wchar_t *wcwd;
-
+
if( !getcwd( cwd, 4096 ) )
{
wperror( L"getcwd" );
@@ -77,11 +78,11 @@ static int read_init()
}
env_set( L"__fish_help_dir", DOCDIR, 0);
-
+
eval( L"builtin cd " DATADIR L"/fish 2>/dev/null; . fish 2>/dev/null", 0, TOP );
eval( L"builtin cd " SYSCONFDIR L" 2>/dev/null; . fish 2>/dev/null", 0, TOP );
eval( L"builtin cd 2>/dev/null;. .fish 2>/dev/null", 0, TOP );
-
+
if( chdir( cwd ) == -1 )
{
// fwprintf( stderr, L"Invalid directory: %s\n", cwd );
@@ -248,7 +249,7 @@ int main( int argc, char **argv )
env_init();
complete_init();
reader_init();
-
+
if( read_init() )
{
if( cmd != 0 )