Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

term-ng

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

term-ng

Terminal/$TERM feature snooping and whitelisting

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
27
decreased by-92.64%
Maintainers
1
Weekly downloads
 
Created
Source

term-ng

Enables enhanced node.js/fish-shell/XTerm/iTerm3 feature integration.

Project status Build Status Dependency Status devDependency Status npm Status

  • Senses 24bit colour (truecolor) when $TERM_COLOR=16m environment variable is set.
  • Adds --color=16m to front of process.argv before wrapping the supports-color.
  • Indicate enhanced media support by setting:
    • $TERM_IMAGES=enabled : Allow rendering of inline images using OSC sequences.
    • $TERM_AUDIO=enabled : Allow enhanced audio.
  • Sense $TERM suffixes to indicate enhanced termcap capabilities.

In some of my 'private' admin/control systems I use a customised terminfo database that wraps some fo the (very useful) enhanced OSC abilities of more recent iTerm builds into new commands available via tput (which I further wrap in fish functions).

The terminfo directory above contains iTerm.ti. Using /usr/bin/tic and ncurses' terminfo database (available from invisible-island.net), I build a new terminal type xterm-256color+iterm3, and change the Terminal type preference in iTerm to the same, setting the $TERM environment variable.

The new terminfo entries are built thusly...

cd term-ng/terminfo
curl http://invisible-island.net/datafiles/current/terminfo.src.gz
gunzip terminfo.src.gz
tic -xrs -e xterm-256color terminfo.src
tic -xsv3 iTerm.ti

This create a new, updated xterm-256color and then extends it for iTerm. this is non-destructive as it creates new entries at ~/.terminfo/. Simply delete this directory to return the terminfo databases back to the original OS provided state.

A word of caution... while this has worked very well for me, I have found that some things complain about an unrecognized term type - Homebrew is notable here. A simple workaround is to have a standard xterm-256color profile defined to use when brewing.

Keywords

FAQs

Package last updated on 06 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc