   cdHere: ->
     file = atom.workspace.getActiveTextEditor()?.getPath()
     file? or atom.notifications.addError 'This file has no path.'
-    @client.cd path.dirname(file)
+    cd path.dirname(file)
 
   cdProject: ->
     dirs = atom.project.getPaths()
     if dirs.length < 1
       atom.notifications.addError 'This project has no folders.'
     else if dirs.length == 1
-      @client.cd dirs[0]
+      cd dirs[0]
     else
       selector.show(dirs).then (dir) =>
         return unless dir?
-        @client.cd dir
+        cd dir
 
   cdHome: ->
-    @client.cd paths.home()
+    cd paths.home()

{paths} = require '../misc'
modules = require './modules'

module.exports =
  client: client.import
    rpc: ['eval', 'evalall']
    msg: ['cd']

  cursor: ({row, column}) ->
    row: row+1

  eval: ->
    editor = atom.workspace.getActiveTextEditor()
    for sel in editor.getSelections()
      evaluate(@evalData(editor, sel)).then ({start, end, result, plainresult}) =>
        if result?
          error = result.type == 'error'
          view = if error then result.view else result
