1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-18 03:40:08 +00:00

fix(emotty): fix bad assignment error (#9714)

This commit is contained in:
Piotr Rogoża 2021-03-15 22:27:00 +01:00 committed by GitHub
parent 040aadf7c4
commit 9d556cd545
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,7 @@ function emotty() {
# Parse tty number via prompt expansion. %l equals: # Parse tty number via prompt expansion. %l equals:
# - N if tty = /dev/ttyN # - N if tty = /dev/ttyN
# - pts/N if tty = /dev/pts/N # - pts/N if tty = /dev/pts/N
local tty = ${${(%):-%l}##pts/} local tty=${${(%):-%l}##pts/}
# Normalize it to an emotty set index # Normalize it to an emotty set index
(( tty = (tty % ${#${=emotty}}) + 1 )) (( tty = (tty % ${#${=emotty}}) + 1 ))