pi-resume-on-exit

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

pi-resume-on-exit

npm version

A Pi package that prints a copyable resume command when an interactive Pi session exits via quit.

Behavior

  • Listens for Pi session_shutdown events.
  • Prints only for quit shutdowns, including Ctrl+C/Ctrl+D/SIGTERM exits handled by Pi.
  • Prefers the active session id when available.
  • Falls back to the session file path and shell-quotes it safely.
  • Never blocks or throws during shutdown.

Example output:

Resume this Pi session:
pi --session abc123

Install

Public npm package:

pi install npm:pi-resume-on-exit

Source package from GitHub:

pi install git:github.com/mujuni88/pi-resume-on-exit

Development

npm install
npm run check