code: def select_window(pymux, variables):
      
      window_id = variables['<target-window>']
  
      def invalid_window():
          raise CommandException('Invalid window: %s' % window_id)
  
      if window_id.startswith(':'):
          try:
              number = int(window_id[1:])
          except ValueError:
              invalid_window()
          else:
              w = pymux.arrangement.get_window_by_index(number)
              if w:
                  pymux.arrangement.set_active_window(w)
              else:
                  invalid_window()
      else:
          invalid_window()
docs: Select a window. E.g:  select-window -t :3