when entering tmux, my default shell becomes Oh My Zsh which is fine.
However as a result before every command for tmux I have to type "tmux" but every single tutorial i am viewing doesn't have that?
for my conf file I also need the "tmux" before any of it runs, previously it doesn't run when i start a new tmux session.
# unbind default prefix and set it to ctrl-a
tmux unbind C-b
tmux set -g prefix C-a
tmux bind C-a send-prefix
make delay shorter
tmux set -sg escape-time 0
key bindings
#split panes using | and -
tmux bind | tmux split-window -h
tmux bind - tmux split-window -v
tmux unbind '"'
tmux unbind %
Thanks in advance!
tmuxbefore any tmux command performed in the shell (e.g.tmux list-commands). Otherwise, how would the shell know that the subcommand was meant fortmux? To execute tmux commands in the shell without that, the prefix keybindings are used (normal Ctrl+b, but you are trying to set it to Ctrl+a, which I like as well). However, it is not normal to have to prefix the config file commands withtmux. As @KamilMaciorowski asked, to which config are you referring? This would be expected if it was azshconfig, but not for the~/.tmux.conf. – NotTheDr01ds Jul 06 '21 at 14:54~/.tmux.conffile @NotTheDr01dsmy shell becomes zsh automatically after i open up a new tmux session and then without the
– itachi_chi Jul 07 '21 at 02:46tmuxprefix inside the ~/.tmux.conf file i cant load the changes or they are not registered.~/.tmux.confis parsed by tmux when tmux server starts or on demand withsource-file ~/.tmux.conftmux command (or semi-equivalenttmux source-file ~/.tmux.confshell command). It doesn't run when you start a new tmux session, unless the new session starts a new server. This is by design. If you made it work by addingtmuxto everything and sourcing from a shell (e.g.. ~/.tmux.conf) then this is wrong. Did you source it from a shell? The file is not designed to be sourced by a shell. I don't think your file works when properly sourced by tmux. – Kamil Maciorowski Jul 07 '21 at 08:47I think I created the
– itachi_chi Jul 07 '21 at 13:14~/.tmux.confmanually too, as it wasn't there, to begin with so I was a little lost following tutorial.tmuxprefixes. In a shell inside tmux runtmux source-file ~/.tmux.confand you will see multipleunknown command: tmux. The messages will be about the prefixes in the file. Remove the prefixes. If after thistmux source-file ~/.tmux.confdoes not complain and brings the desired effect(s) then the same should happen when tmux loads the file automatically when a server starts. – Kamil Maciorowski Jul 07 '21 at 14:04