mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
10fbdd34e7
These are now python scripts
28 lines
636 B
Python
28 lines
636 B
Python
#!/usr/bin/env python3
|
|
from pexpect_helper import SpawnedProc
|
|
|
|
sp = SpawnedProc()
|
|
send, sendline, sleep, expect_prompt, expect_re = (
|
|
sp.send,
|
|
sp.sendline,
|
|
sp.sleep,
|
|
sp.expect_prompt,
|
|
sp.expect_re,
|
|
)
|
|
expect_prompt()
|
|
|
|
sendline(
|
|
"""
|
|
complete -c my_is -n 'test (count (commandline -opc)) = 1' -xa arg
|
|
complete -c my_is -n '__fish_seen_subcommand_from not' -xa '(
|
|
set -l cmd (commandline -opc) (commandline -ct)
|
|
set cmd (string join " " my_is $cmd[3..-1])" "
|
|
commandline --replace --current-process $cmd
|
|
complete -C"$cmd"
|
|
)'
|
|
"""
|
|
)
|
|
|
|
send("my_is not \t")
|
|
send("still.alive")
|
|
expect_re(".*still.alive")
|