Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
include expect/unbuffer in INSTALL install list
  • Loading branch information
jef-n committed Jun 9, 2017
1 parent c21846a commit 43fac74
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/scandeps.pl
Expand Up @@ -86,6 +86,7 @@

push @dep, $dep;
push @dep, "cmake-curses-gui";
push @dep, "expect"; # for unbuffer

This comment has been minimized.

Copy link
@3nids

3nids Jun 10, 2017

Member

I think it is exclusively used in spell_check.
If so, have you include silver-searcher too?


print O "| $dist | ``apt-get install" . join( " ", @dep ) . "`` |\n";
}
Expand Down

3 comments on commit 43fac74

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n on a semi-related note, do you know if there's any unbuffer binaries available for Windows? My searching proved fruitless...

@jef-n
Copy link
Member Author

@jef-n jef-n commented on 43fac74 Jun 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nyalldawson I use cygwin's expect and this:

#!/bin/sh
# -*- tcl -*-
# The next line is executed by /bin/sh, but not tcl \
exec tclsh "$0" ${1+"$@"}

package require Expect


# -*- tcl -*-
# Description: unbuffer stdout of a program
# Author: Don Libes, NIST

if {[string compare [lindex $argv 0] "-p"] == 0} {
    # pipeline
    set stty_init "-echo"
    eval [list spawn -noecho] [lrange $argv 1 end]
    close_on_eof -i $user_spawn_id 0
    interact {
	eof {
	    # flush remaining output from child
	    expect -timeout 1 -re .+
	    return
	}
    }
} else {
    set stty_init "-opost"
    set timeout -1
    eval [list spawn -noecho] $argv
    expect
    exit [lindex [wait] 3]
}

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jef-n perfect, thanks!

Please sign in to comment.