Skip to content

Instantly share code, notes, and snippets.

@AndreSteenveld
Created December 10, 2020 15:15
Show Gist options
  • Save AndreSteenveld/fed7956a155545a211c928a778b95a3a to your computer and use it in GitHub Desktop.
Save AndreSteenveld/fed7956a155545a211c928a778b95a3a to your computer and use it in GitHub Desktop.
winpty stub for nix
#!/usr/bin/env bash
eval "$@" <(cat)
#
# Every now and then I have to write scripts which will work from git-bash as well as a proper *nix
# system. Adding this on my *nix system helps with the strangeness which is git-bash. All we would
# like to do here is redirect all the stdin, out and err "like winpty does" on a windows system.
#
# Clearly on *nix there is no need to translate between tty and the terminal serivice on windows.
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment