diff options
author | 2007-01-08 00:13:36 +1000 | |
---|---|---|
committer | 2007-01-08 00:13:36 +1000 | |
commit | 1214067d038761d534cb03f230e0bc4f2a79fb99 (patch) | |
tree | 4f86c3705ff13ddcc6a5be0d7170d529d6d8bef1 /reader.c | |
parent | 0469d05447383b5df661d1dcd31649d2aa12af1c (diff) |
Redo the interface between fish and the completion pager. The old interface has issues if the current user does not own the tty, as happens when using 'su'. It also had issues when stderr was redirected. The new interface should be more extensible as well.
darcs-hash:20070107141336-ac50b-30bdfb198674b93a67d323c0a65b8e08b43c0525.gz
Diffstat (limited to 'reader.c')
-rw-r--r-- | reader.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -975,14 +975,15 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp ) sb_init( &cmd ); sb_init( &msg ); sb_printf( &cmd, - L"fish_pager %d %ls", + L"fish_pager -c 3 -r 4 %ls -p %ls", // L"valgrind --track-fds=yes --log-file=pager.txt --leak-check=full ./fish_pager %d %ls", - is_quoted, + is_quoted?L"-q":L"", prefix_esc ); free( prefix_esc ); io_data_t *in= io_buffer_create( 1 ); + in->fd = 3; for( i=0; i<al_get_count( comp); i++ ) { @@ -999,7 +1000,7 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp ) io_data_t *out = io_buffer_create( 0 ); out->next = in; - out->fd = 1; + out->fd = 4; eval( (wchar_t *)cmd.buff, out, TOP); term_steal(); |