diff --git a/.aliases b/.aliases index 2fee121..1267c3f 100644 --- a/.aliases +++ b/.aliases @@ -66,3 +66,11 @@ alias glv="vim -c ':DiffviewFileHistory'" # Start the SSH agent, prompting for your passphrase. alias s="start_agent" + +# If you connect to remote host with key forwarding, start a tmux session, then +# disconnect and reconnect, the SSH_AUTH_SOCK file is recreated in a different +# path but the still-running tmux session is still using the old path. So it +# behaves like keys are not forwarded. Run this fix to update the path so that +# the key is forwarded again. +alias st='[ -n "$TMUX" ] && eval $(tmux show-environment -s SSH_AUTH_SOCK)' + diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 0a22e36..a3dfbf4 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -16,7 +16,7 @@ require("config.options") -- Colorscheme. -- Add your favorite colorscheme to lua/plugins/colorscheme.lua (which will be -- loaded with `config.lazy` above), and then use it here. -vim.cmd("colorscheme zenburn") +vim.cmd("colorscheme zenfade") -- Uncomment these lines if you use a terminal that does not support true color: -- vim.cmd("colorscheme onedark") diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index ad84ed7..e503e0f 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -23,6 +23,7 @@ return { "bash", "css", "dockerfile", + "hcl", "html", "json", "lua", diff --git a/docs/bash.rst b/docs/bash.rst index 855b774..a83b2c1 100644 --- a/docs/bash.rst +++ b/docs/bash.rst @@ -107,6 +107,12 @@ for the commands set for each alias. * - ``s`` - Runs the start_agent function (see :file:`.functions` below) + * - ``st`` + - If you connect to a host with SSH key fowarding, start a tmux session, + and then disconnect and reconnect to the remote tmux session, the + ``SSH_AUTH_SOCKET`` path used by tmux is stale, preventing key fowarding. + This refreshes the path so that key forwarding works. + * - ``git-clean-branches-master`` - Deletes any git branches that have been merged into the master branch diff --git a/docs/changelog.rst b/docs/changelog.rst index 846b994..6ad36d5 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,18 @@ Changelog ========= +2025-10-27 +---------- + +**vim** + +- Use `zenfade `__ as the default colorscheme + +**bash** + +- New alias, ``st``, for refreshing the SSH_AUTH_SOCKET when reconnecting to + a tmux session where you're forwarding SSH keys to the remote host. + 2025-08-14 ----------