o inhS@s:ddlZddlmZddlmZddlmZdddZdS) N)ArgcompleteException)debug)_shlexc sdurt||d}tj|ddd_tjdd_gfdd} z/}|j kr=ddddfWSj krTt d|dj jd ||WS|Wn'tyt djd j jd j kr{|jYSd }t|wq+) NT)posix_ARGCOMPLETE_COMP_WORDBREAKScst|j}tjttfrjjvr|d7}|t|kr.td |d}|d|||d}}d}jdurKjj vrKj}|||j fS)NrzIn trailing whitespacer) leninstreamtell isinstancestatestrbytes whitespacerappendquoteslast_wordbreak_pos)word point_in_wordprefixsuffixprequotelexerpointwords=/usr/local/lib/python3.10/dist-packages/argcomplete/lexers.py split_words  zsplit_line..split_wordrzsplit, lexer state: '{s}')sz#split (lexer stopped, state: '{s}')zcUnexpected internal state. Please report this bug at https://github.com/kislyuk/argcomplete/issues.)r rshlexwhitespace_splitosenvironget wordbreaks get_tokeneofr r rformatr r ValueErrortokenr)linerrrmsgrrr split_lines4    r.)N)r# exceptionsriorpackagesrr.rrrrs