 focus_cli = ->
   $('#command_line').focus()
 
-form_submit = ->
+cli_submit = ->
   $('#cli').submit (e) ->
     input = $('#command_line').val()
     if input != 'clear'

# Set after running command
$(document).ajaxComplete ->
  focus_cli()
  form_submit()

$ ->
  # Set on page load
  focus_cli()
  cli_submit()

  # Focus when clicking anywhere on the page
  $(document).click ->
