diff --git a/shells/zsh/includes/keybindings.zsh b/shells/zsh/includes/keybindings.zsh index d6ec02c9..aa714753 100644 --- a/shells/zsh/includes/keybindings.zsh +++ b/shells/zsh/includes/keybindings.zsh @@ -65,16 +65,16 @@ bindkey -M viins jj vi-cmd-mode function fg-bg() { if [[ $#BUFFER -eq 0 ]]; then local backgroundProgram="$(jobs | tail -n 1 | awk '{print $4}')" - if [[ "$backgroundProgram" == "nc" ]] || [[ "$backgroundProgram" == "ncat" ]]; then - # Make sure that /dev/tty is given to the stty command - local columns=$(stty -a < /dev/tty | grep -oE 'columns [0-9]+' | cut -d' ' -f2) - local rows=$(stty -a < /dev/tty | grep -oE 'rows [0-9]+' | cut -d' ' -f2) - notify-send "Terminal dimensions" "Rows: $rows\nColumns: $columns\nstty command on clipboard" - echo "stty rows $rows cols $columns" | clip - stty raw -echo < /dev/tty; fg - else - fg - fi + case "$backgroundProgram" in + "nc"|"ncat"|"netcat"|"resize-netcat-listener"|"rnc") + # Make sure that /dev/tty is given to the stty command by doing