#NEWLINE# def SessionCompleter( prefix , parsed_args , **kwargs ) : #NEWLINE# #INDENT# 'Return list of session names for argcomplete completer.' #NEWLINE# t = Server ( socket_name = parsed_args . socket_name , socket_path = parsed_args . socket_path ) #NEWLINE# sessions_available = [ s . get ( 'session_name' ) for s in t . _sessions if s . get ( 'session_name' ) . startswith ( ' ' . join ( prefix ) ) ] #NEWLINE# if ( s . session_name and sessions_available ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# return [ s . get ( 'session_name' ) for s in t . _sessions if s . get ( 'session_name' ) . startswith ( prefix ) ]