Cli.zsh_ends: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 6898-6908 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=6898&end_line=6908 import Base # At the top command (no words), the count of "--" before the cursor that # zsh_past_end compares with. def zsh_ends(words: List<&2, String>, +ind: String) -> List<&2, String>: match words: case Nil{}: [String.append(ind, "# _arguments -S drops a -- typed before a command's first word, so a"), String.append(ind, "# state whose words hold fewer -- than the line has is past one."), String.append(ind, "local -i ends=${#${(M)words[2,CURRENT-1]:#--}}")] case _: [] Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append