echo

A cross-platform, cross-console way to handle echoing terminal input

https://github.com/RyanGlScott/echo

LTS Haskell 22.41:0.1.4
Stackage Nightly 2024-11-12:0.1.4
Latest on Hackage:0.1.4

See all snapshots echo appears in

BSD-3-Clause licensed by Ryan Scott
Maintained by Ryan Scott
This version can be pinned in stack with:echo-0.1.4@sha256:ccce771562c49a2b29a52046ca68c62179e97e8fbeacdae32ca84a85445e8f42,2834

Module documentation for 0.1.4

Depends on 3 packages(full list with versions):
Used by 1 package in nightly-2024-09-19(full list with versions):

echo

Hackage Hackage Dependencies Haskell Programming Language BSD3 License Linux build Windows build

The base library exposes the hGetEcho and hSetEcho functions for querying and setting echo status, but unfortunately, neither function works with MinTTY consoles on Windows. This is a serious issue, since hGetEcho and hSetEcho are often used to disable input echoing when a program prompts for a password, so many programs will reveal your password as you type it on MinTTY!

This library provides an alternative interface which works with both MinTTY and other consoles. An example is included which demonstrates how one might prompt for a password using this library. To build it, make sure to configure with the -fexample flag.

Changes

0.1.4 [2021.02.17]

  • Use Trustworthy, not Safe, on GHC 7.2 to work around an old GHC bug.

0.1.3 [2017.01.30]

  • The MinTTY-detection portion of this library has been split off into mintty, on which echo now depends.

0.1.2 [2017.01.09]

  • Use more efficient implementation for bracketInputEcho.

0.1.1 [2017.01.07]

  • Use System.Win32.MinTTY from Win32-2.5 or later if possible.

0.1 [2016.12.22]

  • First version.