From b507f9809af6d86aea26b54c327f0a208d35d25b Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Thu, 3 Dec 2020 07:45:06 +0000 Subject: [PATCH] feat(devcontainer): persist bash history When combined with the root user volume, this commit instructs bash to save each command to the bash history after execution, thereby sharing the bash history between any containers that use the volume. Based on the advice of KemoNine. PR: #480 --- .devcontainer/devcontainer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 1477df74..7d6acd05 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,10 @@ "name": "ZMK Development", "dockerFile": "Dockerfile", "runArgs": ["--security-opt", "label=disable"], - "containerEnv": { "WORKSPACE_DIR": "${containerWorkspaceFolder}" }, + "containerEnv": { + "WORKSPACE_DIR": "${containerWorkspaceFolder}", + "PROMPT_COMMAND": "history -a" + }, "mounts": [ "type=volume,source=zmk-root-user,target=/root", "type=volume,source=zmk-config,target=/workspaces/zmk-config"