mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Minor cleanups
darcs-hash:20051129101303-ac50b-11843dc32a9d05037b907fe1ac5df6a90cb7dd36.gz
This commit is contained in:
parent
c2e6b07b35
commit
02981a1750
3 changed files with 8 additions and 13 deletions
11
builtin.c
11
builtin.c
|
@ -1957,22 +1957,13 @@ static int builtin_complete( wchar_t **argv )
|
|||
}
|
||||
|
||||
/**
|
||||
The source builtin. Can be called through either 'source' or
|
||||
'.'. Evaluates the contents of a file.
|
||||
The . (dot) builtin, sometimes called source. Evaluates the contents of a file.
|
||||
*/
|
||||
static int builtin_source( wchar_t ** argv )
|
||||
{
|
||||
int fd;
|
||||
int res;
|
||||
|
||||
/*
|
||||
if( wcsstr( argv[1], L"fish_complete" ) )
|
||||
{
|
||||
fwprintf( stderr, L"Woot\n" );
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
if( (argv[1] == 0) || (argv[2]!=0) )
|
||||
{
|
||||
|
||||
|
|
2
env.c
2
env.c
|
@ -186,7 +186,7 @@ static void start_fishd()
|
|||
sb_init( &cmd );
|
||||
pw = getpwuid(getuid());
|
||||
|
||||
debug( 2, L"Spawning new copy of fishd" );
|
||||
debug( 3, L"Spawning new copy of fishd" );
|
||||
|
||||
if( !pw )
|
||||
{
|
||||
|
|
|
@ -171,7 +171,7 @@ static void check_connection()
|
|||
|
||||
if( env_universal_server.killme )
|
||||
{
|
||||
debug( 2, L"Lost connection to universal variable server." );
|
||||
debug( 3, L"Lost connection to universal variable server." );
|
||||
close( env_universal_server.fd );
|
||||
env_universal_server.fd = -1;
|
||||
env_universal_server.killme=0;
|
||||
|
@ -190,7 +190,7 @@ static void reconnect()
|
|||
if( get_socket_count >= RECONNECT_COUNT )
|
||||
return;
|
||||
|
||||
debug( 2, L"Get new fishd connection" );
|
||||
debug( 3, L"Get new fishd connection" );
|
||||
|
||||
init = 0;
|
||||
env_universal_server.fd = get_socket(1);
|
||||
|
@ -259,6 +259,8 @@ int env_universal_read_all()
|
|||
if( !init)
|
||||
return 0;
|
||||
|
||||
debug( 3, L"env_universal_read_all()" );
|
||||
|
||||
if( env_universal_server.fd == -1 )
|
||||
{
|
||||
reconnect();
|
||||
|
@ -287,11 +289,13 @@ wchar_t *env_universal_get( const wchar_t *name )
|
|||
if( !name )
|
||||
return 0;
|
||||
|
||||
debug( 3, L"env_universal_get( \"%ls\" )", name );
|
||||
return env_universal_common_get( name );
|
||||
}
|
||||
|
||||
int env_universal_get_export( const wchar_t *name )
|
||||
{
|
||||
debug( 3, L"env_universal_get_export()" );
|
||||
return env_universal_common_get_export( name );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue