zsh-navigation-tools
zsh-navigation-tools copied to clipboard
[bug]: Tmux fails ctrl+h b when tmux session is created with "tmux new-session -s <session_name>"
Environment
PRETTY_NAME="Ubuntu 22.04.3 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.3 LTS (Jammy Jellyfish)"
Reproduction steps
1. I have tmux installed
2. I tap in terminal $ tmux new-session -s my_session
3. Once inside my session I do ctrl+b h
4. ERROR -> '/home/salazar/.zim/modules/zsh-navigation-tools/doc/znt-tmux.zsh' returned 1
Expected behavior
1. Once inside my session I do ctrl+b h
2. n-history widget should pop up and propose my command's history
Current behavior
It actually works when creating a session only by tapping $ tmux
Code snippet
source ${ZIM_HOME}/init.zsh
------------------------------
Post-init module configuration
------------------------------
zsh-history-substring-search
zmodload -F zsh/terminfo +p:terminfo
Bind ^[[A/^[[B manually so up/down works both before and after zle-line-init
for key ('^[[A' '^P' ${terminfo[kcuu1]}) bindkey ${key} history-substring-search-up for key ('^[[B' '^N' ${terminfo[kcud1]}) bindkey ${key} history-substring-search-down for key ('k') bindkey -M vicmd ${key} history-substring-search-up for key ('j') bindkey -M vicmd ${key} history-substring-search-down unset key
}}} End configuration added by Zim install
Set up the prompt
autoload -Uz promptinit promptinit
prompt adam1
setopt histignorealldups sharehistory
Use emacs keybindings even if our EDITOR is set to vi
bindkey -e
Keep 1000 lines of history within the shell and save it to ~/.zsh_history:
HISTSIZE=1000 SAVEHIST=1000 HISTFILE=~/.zsh_history
Use modern completion system
autoload -Uz compinit compinit
zstyle ':completion:' auto-description 'specify: %d' zstyle ':completion:' completer _expand _complete _correct approximate zstyle ':completion:' format 'Completing %d' zstyle ':completion:' group-name '' zstyle ':completion:' menu select=2 eval "$(dircolors -b)" zstyle ':completion::default' list-colors ${(s.:.)LS_COLORS} zstyle ':completion:' list-colors '' zstyle ':completion:' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[.-]=* r:|=* l:|=' zstyle ':completion:' menu select=long zstyle ':completion:' select-prompt %SScrolling active: current selection at %p%s zstyle ':completion:' use-compctl false zstyle ':completion:*' verbose true
zstyle ':completion:::kill::processes' list-colors '=(#b) #([0-9]#)=0=01;31' zstyle ':completion::kill:' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
Additional information
no aditional info
Self-service
- [X] I'd be willing to address this documentation request myself.
Have you read the Contributing Guidelines?
- [X] I have read the Contributing Guidelines.
Are you familiar with the Contributor Covenant Code of Conduct?
- [X] I have read the Contributor Covenant Code of Conduct.