bind: command not found
bind: command not found
bind: command not found
bind: command not found
bind: command not found
bind: command not found
bind: command not found
bind: command not found
bind: command not found
bind: command not found
bind: command not found
bind: command not found
bind: command not found
gianarb@dieci \[\]~/git/glue/go\[\] (main=) $
If i go the other way around and I run nix develop inside a tmux session everything works just line
Possibly a distraction, but your shell prompt containing escape backslashes is something I have, when I run bash inside a nix develop shell:
…/nix-develop-and-tmux-bind-command-not-found-24029 on main at 21:14:48 zsh
❯ nix develop
…/nix-develop-and-tmux-bind-command-not-found-24029 on main via (nix-shell) at 21:14:50 bsh
❯ bash
\[\]↕\[\]\[\]3\[\] \[\]…/nix-develop-and-tmux-bind-command-not-found-24029\[\] on \[\] \[\]\[\]main\[\] via \[\] \[\]\[\] (\[\]\[\]nix-shell\[\]\[\])\[\] at \[\]21:14:51\[\] \[\]bsh\[\]
\[\]❯\[\]
Running outside of nix develop:
…/nix-develop-and-tmux-bind-command-not-found-24029 on main took 1m5s at 21:15:56 zsh
❯ bash
…/nix-develop-and-tmux-bind-command-not-found-24029 on main at 21:15:57 bsh
❯
(note my primary shell is zsh).
Though this happens when I’ve used mkShellNoCC too so likely a different issue.
One question I have is, are you joining an existing tmux session, starting a new tmux session, or does this occur in both? I’ve noticed when I join an existing session on my desktop via ssh from my laptop, and switch clients via ( and ) keys, then go back to my desktop and create a new window via ctrl-C, the $SSH_CONNECTION variable is still set and my shell thinks I’m ssh-ing (the starship prompt makes this obvious).
The reason for this is because while $SSH_CONNECTION wasn’t set in the original client, when I joined it from a new client which had $SSH_CONNECTION set, it inherited it. I can verify this by running tmux show-environment from within a new tmux window from my desktop.
Sorry I’m rambling a bit, question is, how do you open tmux? Are there existing tmux windows/sessions open?
Sorry if this is just noise but I had a similar problem with VS Code. Everything else worked well, but code behaved erratically (uninterpreted escape sequences, lots of shopts errors, etc).
I solved my problem by adding a symlink from $HOME/bin/bash to ../.nix-profile/bin/bash. No clue why code was picking up the wrong bash but not other programs (like iTerm).