You are not logged in.

#1 2014-04-20 17:30:27

Arachnid92
Member
From: Sweden
Registered: 2011-05-02
Posts: 40
Website

Zsh and interactive commands.

I'm having a strange issue with zsh. I run it as my login shell, but when I run interactive commands within it in Terminator (like pacman, or yaourt), special keys and keycombos like Enter and Ctrl-C stop working, and just output text (^M for Enter, ^C for Ctrl-C). I read about this being a problem with certain programs changing the state of the shell and not changing it back, and in fact I can fix this temporarily by running

reset && ttyctl -f

but the problem returns with every new instance of Terminator I launch.

How can I make this fix persistent? Thanks in advance.

Offline

#2 2014-04-20 17:55:22

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: Zsh and interactive commands.

You should start by reporting  a bug with Terminator: https://bugs.launchpad.net/terminator

Offline

#3 2014-05-04 16:12:09

Arachnid92
Member
From: Sweden
Registered: 2011-05-02
Posts: 40
Website

Re: Zsh and interactive commands.

x33a wrote:

You should start by reporting  a bug with Terminator: https://bugs.launchpad.net/terminator

I've actually narrowed it down to being a problem with Zsh, and not terminator, since the problem persists even when running on a TTY without a graphical environment.

Offline

#4 2014-05-04 16:15:41

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,723
Website

Re: Zsh and interactive commands.

Post your zshrc, zprofile, etc.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2014-05-04 16:31:49

Arachnid92
Member
From: Sweden
Registered: 2011-05-02
Posts: 40
Website

Re: Zsh and interactive commands.

.zshrc:

# The following lines were added by compinstall

zstyle ':completion:*' completer _expand _complete _ignored _approximate
zstyle ':completion:*' completions 1
zstyle ':completion:*' expand suffix
zstyle ':completion:*' format 'Autocompletion (%d)'
zstyle ':completion:*' glob 1
zstyle ':completion:*' group-name ''
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' list-suffixes true
zstyle ':completion:*' matcher-list '+' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*'
zstyle ':completion:*' max-errors 3
zstyle ':completion:*' menu select=1
zstyle ':completion:*' original true
zstyle ':completion:*' preserve-prefix '//[^/]##/'
zstyle ':completion:*' prompt 'Suggestions:'
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' substitute 1
zstyle ':completion:*' verbose true
zstyle :compinstall filename '/home/arachnid92/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt autocd beep extendedglob
unsetopt appendhistory
bindkey -e
# End of lines configured by zsh-newuser-install

alias systemctl='sudo systemctl'
alias pacman='sudo pacman'
alias ls='ls --color=auto'
alias shutdown='shutdown -hP -t sec now'
alias anakena='ssh molguin@anakena.dcc.uchile.cl'
alias c_compile='gcc -Wall -pedantic -std=c99'
export EDITOR="vim"
setopt completealiases

#Command not found
[ -r /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh

#Keys
# create a zkbd compatible hash;
# to add other keys to this hash, see: man 5 terminfo
typeset -A key

key[Home]=${terminfo[khome]}

key[End]=${terminfo[kend]}
key[Insert]=${terminfo[kich1]}
key[Delete]=${terminfo[kdch1]}
key[Up]=${terminfo[kcuu1]}
key[Down]=${terminfo[kcud1]}
key[Left]=${terminfo[kcub1]}
key[Right]=${terminfo[kcuf1]}
key[PageUp]=${terminfo[kpp]}
key[PageDown]=${terminfo[knp]}

# setup key accordingly
[[ -n "${key[Home]}"    ]]  && bindkey  "${key[Home]}"    beginning-of-line
[[ -n "${key[End]}"     ]]  && bindkey  "${key[End]}"     end-of-line
[[ -n "${key[Insert]}"  ]]  && bindkey  "${key[Insert]}"  overwrite-mode
[[ -n "${key[Delete]}"  ]]  && bindkey  "${key[Delete]}"  delete-char
[[ -n "${key[Up]}"      ]]  && bindkey  "${key[Up]}"      up-line-or-history
[[ -n "${key[Down]}"    ]]  && bindkey  "${key[Down]}"    down-line-or-history
[[ -n "${key[Left]}"    ]]  && bindkey  "${key[Left]}"    backward-char
[[ -n "${key[Right]}"   ]]  && bindkey  "${key[Right]}"   forward-char

# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
    function zle-line-init () {
        printf '%s' "${terminfo[smkx]}"
    }
    function zle-line-finish () {
        printf '%s' "${terminfo[rmkx]}"
    }
    zle -N zle-line-init
    zle -N zle-line-finish
fi

#PATH
PATH="$HOME/android-sdk-linux/build-tools:$HOME/android-sdk-linux/platform-tools:$HOME/android-sdk-linux/tools:$PATH"

#PROMPT
autoload -U promptinit
promptinit

autoload -U colors && colors

PROMPT="%{$fg_no_bold[magenta]%}%B%n %{$fg[green]%}%#>%{$reset_color%}%b "
RPROMPT="%{$fg[yellow]%}[%{$fg[cyan]%}%~%{$fg[yellow]%}]%{$reset_color%}"

I have no other Zsh related config files in my home directory though.

Offline

Board footer

Powered by FluxBB