def zsh_ends
cli@0.2.0.0 · cli.bend:6898
import cli@0.2.0.0/cli.bend as Cli
import Base
6898
6899
6900def zsh_ends(words: List<&2, String>, +ind: String) -> List<&2, String>:
6901 match words:
6902 case Nil{}:
6903 [String.append(ind,
6904 "# _arguments -S drops a -- typed before a command's first word, so a"),
6905 String.append(ind,
6906 "# state whose words hold fewer -- than the line has is past one."),
6907 String.append(ind, "local -i ends=${#${(M)words[2,CURRENT-1]:#--}}")]
6908 case _: []