Skip to content

Commit

Permalink
vimcat: use fifo not file, even on cygwin etc.
Browse files Browse the repository at this point in the history
In 09fd981 the tail -f call for reading the fifo was replaced with a cat
loop, this works fine on cygwin and presumably everywhere else it didn't
work before, so remove the OS check for making a regular file instead of
a fifo and always make a fifo instead.

This also fixes vimcat on cygwin/msys since 09fd981 broke it, the cat
loop would repeat the file over and over.
  • Loading branch information
rkitover committed Dec 5, 2017
1 parent 09fd981 commit 897a467
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions vimcat
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,7 @@ trap 'quit 1' PIPE HUP INT QUIT ILL TRAP KILL BUS TERM
tmp_file_in=$tmp_dir/vimcat_in.txt
out_fifo=$tmp_dir/vimcat_out.fifo

case $(uname -s) in
SunOS*|CYGWIN*|MINGW*|MSYS*)
# the fifo streaming doesn't work on windows and solaris
touch "$out_fifo"
;;
*)
mkfifo "$out_fifo"
;;
esac
mkfifo "$out_fifo"

# check for arguments
while [ $# -gt 0 ] ; do
Expand Down

0 comments on commit 897a467

Please sign in to comment.