A recent addition to my dtache package, which is the packaged for detached shell commands, is a configuration example for integration with vterm. The vterm package is a “fully-fledged terminal emulator inside of GNU Emacs” which is an excellent alternative for those who are note satisified with eshell and shell.

Since vterm is not part of Emacs I haven’t added a dedicated integration file for users but instead added an entry to the README adding a use-package configuration which implements the necessary functions.

Users of dtache and vterm probably want to add ignore dtach entries in their shell history. The integration is less sophisticated then the one in shell, resulting in dtach commands being shown/logged explicitly. In bash its possible to avoid adding the commands to the history with the following addition to the .bashrc file.

export HISTIGNORE='rm *:dtach*'

The following gif illustrates how dtache can be used inside vterm to create, detach from, and attach to a session.