elementary / terminal

Terminal emulator designed for elementary OS
https://elementary.io
GNU Lesser General Public License v3.0
409 stars 97 forks source link

Completion notifications do not work when the default shell is ZSH #436

Open spotlesscoder opened 4 years ago

spotlesscoder commented 4 years ago

Prerequisites

Describe the bug

To Reproduce

Installed ZSH via the oh-my-zsh install script. Run the command sleep 10, open another tab, wait 10 seconds.

Expected behaviour

Old tab should get a green check icon after 10 seconds and play a notification ringtone.

Platform Information

OS: elementary OS 5.1 hera Kernel: x86_64 Linux 5.0.0-37-generic Shell: zsh 5.4.2 Resolution: 1920x1080 DE: GNOME WM: Mutter(Gala) WM Theme: elementary GTK Theme: elementary [GTK2/3] Icon Theme: elementary Font: Open Sans 9 CPU: AMD PRO A12-9800B R7, 12 COMPUTE CORES 4C+8G @ 4x 2.7GHz [73.0°C] GPU: AMD/ATI Wani [Radeon R5/R6/R7 Graphics]

Please check what applies: -->

spotlesscoder commented 4 years ago

Related work I found might be #244 and #305

ubgus commented 4 years ago

Did you add this line to .zshrc? builtin . /usr/share/io.elementary.terminal/enable-zsh-completion-notifications || builtin true

spotlesscoder commented 4 years ago

Added it but still no success This is the content of my .zshrc

export ZSH="/home/user/.oh-my-zsh"

mkdircd () {
  mkdir "$@"
  if [ "$1" = "-p" ]; then
      cd "$2"
  else
      cd "$1"
  fi
}

long_ls() {
  local VAR="Permissions(UGO)|Owner|Group|Size|Modified|Name"

  if [ ! "${1}" ]; then
    echo -e "$VAR" | column -t -s"|" && ls -l --color=auto
  else
    echo -e "$VAR" | column -t -s"|" && ls -l --color=auto "${1}"
  fi
}

plugins=(
  zsh-autosuggestions
  history-substring-search
  git
  git-flow
  docker
  docker-compose
  helm
  kubectl
  minikube
  mvn
  npm
  jhipster
  ng
  tmux
  rsync
  systemd
  ubuntu
)
ZSH_THEME="agnoster"

source $ZSH/oh-my-zsh.sh

export PATH=$PATH:/snap/bin/

# Aliases
alias mvncit="mvn clean install"

builtin .
/usr/share/io.elementary.terminal/enable-zsh-completion-notifications ||
builtin true

screenfetch
ubgus commented 4 years ago

I don't know if it was a formatting error, but I believe the code should be just one line: ' builtin . /usr/share/io.elementary.terminal/enable-zsh-completion-notifications || builtin true ' You can see it at the end of the README.md file of elementary/Terminal

spotlesscoder commented 4 years ago

The problem seems to be the line export PATH=$PATH:/snap/bin/ in my .zshrc