Vim: Warning: Input is not from a terminal
Thanks for map!
I use it for almost everything I used to use xargs/parallel for, apart from passing a list of files to vim, which results in the warning above. The files can be edited OK, but afterwards the screen is unresponsive/mangled (until a reset).
parallel has an option to work around this (--tty), as does xargs on OS X/BSD (-o). Could something similar be implemented in map?
As a workaround, I've created a vip command which reattaches vim's stdin to /dev/tty e.g.:
#!/bin/sh
# usage: whatever | map vip
exec vim < /dev/tty "$@"
my apologies; I did not see this until now. I generally don't log on to github much.
Anyway, map was not designed to support anything interactive. However, looking at the xargs man page, it seems this would work (and it is essentially the same solution you have): whatever | map -n 1 'vim < /dev/tty'
To make that happen internally, I suspect I would have close STDIN before launching; I'll try it out when I get some time.
my apologies; I did not see this until now. I generally don't log on to github much.
Anyway, map was not designed to support anything interactive. However, looking at the xargs man page, it seems this would work (and it is essentially the same solution you have): whatever | map -n 1 'vim < /dev/tty'
To make that happen internally, I suspect I would have close STDIN before launching; I'll try it out when I get some time.
I've completely rewritten the command, and vim appears to work, but has the same issue (need 'stty sane' after exit). I'll take another look once it has stabilised; will keep this issue open to remind me (but please note I log on to github about once in 6 months, if that!)