             return @setItems []
 
         # add basic commands for the current grammar language
-        basicCommands = @basicCommands.map (command) ->
-            name =
-                command.name + ' ' + kernel.kernelSpec.display_name + ' kernel'
+        basicCommands = @basicCommands.map (command) =>
             return {
-                name: name
-                value: command.value
+                name: @_getCommandName command.name, kernel.kernelSpec
+                command: command.value
                 grammar: grammar
                 language: language
                 kernel: kernel
             }
 
         if kernel instanceof WSKernel
-            wsKernelCommands = @wsKernelCommands.map (command) ->
-                name =
-                    command.name + ' ' + kernel.kernelSpec.display_name + ' kernel'
+            wsKernelCommands = @wsKernelCommands.map (command) =>
                 return {
-                    name: name
-                    value: command.value
+                    name: @_getCommandName command.name, kernel.kernelSpec
+                    command: command.value
                     grammar: grammar
                     language: language
                     kernel: kernel

            # add commands to switch to other kernels
            @kernelManager.getAllKernelSpecsFor language, (kernelSpecs) =>
                _.pull kernelSpecs, kernel.kernelSpec
                switchCommands = kernelSpecs.map (spec) ->
                    return {
                        name: 'Switch to ' + spec.display_name
                        value: 'switch-kernel'
                        grammar: grammar
                        language: language
                        kernelSpec: spec
                    }

                @setItems _.union basicCommands, switchCommands


    confirmed: (item) ->
        console.log 'Selected command:', item
        item.command = item.value
        @onConfirmed?(item)
        @cancel()


        super

        @basicCommands = [
            name: 'Interrupt'
            value: 'interrupt-kernel'
        ,
            name: 'Restart'
            value: 'restart-kernel'
        ,
            name: 'Shut Down'
            value: 'shutdown-kernel'
        ]

        @wsKernelCommands = [
            name: 'Rename session for'
            value: 'rename-kernel'
        ,
            name: 'Disconnect from'
            value: 'disconnect-kernel'
        ]

        @onConfirmed = null
        @list.addClass('mark-active')
        @setItems([])

