Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
ttyname is a small library that lets you get the name of a tty device.
Ruby C
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ext
lib
.gemspec.rb
.gitignore
Gemfile
LICENSE
README.md
Rakefile
ttyname.gemspec

README.md

ttyname

ttyname is a small library that lets you get the name of a tty device.

Description

ttyname adds one method (ttyname) that returns the name of the tty device of an IO instance.

Installation

Add this line to your application's Gemfile:

gem "ttyname"

And then execute:

$ bundle install

Or install it yourself as:

$ gem install ttyname

Usage

To get the ttyname of the $stdout terminal.

require "ttyname"

name = $stdout.ttyname
puts "Your terminal is #{name}"

Contributing

Fork, branch & pull request.

Something went wrong with that request. Please try again.