Skip to content
This repository

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ext
Octocat-spinner-32 lib
Octocat-spinner-32 .gemspec.rb
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 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.