Crate plume [] [src]

Plume enables your command-line tools to ask users to write text in their favourite editor.

This works similarly to how Git spawns your ${EDITOR} to let you write a commit message.

Plume will first check the ${EDITOR} environment variable. If it is set, then the value is used as the text editor.

If ${EDITOR} is not set, then Plume will search for a well-known text editor. If it finds one installed, then it will use it.

Plume then spawns the text editor, letting the user type their text. When they save and close the editor, Plume will retrieve the entered text and return it.

Currently, the list of well-known text editors are, in this order:

  • /usr/bin/nano
  • /usr/bin/vim
  • /usr/bin/vi

This should work on most UNIX-like operating systems.



Get some text from the user