Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Atom IDE Terminal should open in current project directory by default #265

Open
1 task done
richiksc opened this issue Jun 5, 2018 · 3 comments
Open
1 task done

Comments

@richiksc
Copy link
Contributor

richiksc commented Jun 5, 2018

Before Submitting

  • Have you installed an "ide-" language package? atom-ide-ui provides no functionality
    out-of-the box unless you've installed a suitable package.
  • If your issue is language-specific, please file an issue against
    the "ide-" language package you're using instead.

Description

  1. Open a project directory in Atom by going to File > Open folder and selecting a directory.
  2. Start an Atom IDE Terminal by toggling the command pane and running atom-ide-terminal:new-terminal.
  3. Observe the current working directory of the terminal. Try the command cwd.

Expected Behavior

By default, the terminal should open in the project directory, or there should be an option in package config to set it to open by default in the package directory, even when there is a file open. Ideally the current working directory would have three options:

  • Open in file directory, fall back to project directory
  • Always open in project directory
  • Open in file directory, fall back to home directory (current behavior)

Actual Behavior

The terminal will open in the directory of the currently opened file, which is fine, but if there is no file open it will open in your home directory ~.

Versions

  • Atom: 1.27.2 x64
  • Client OS: Windows 10 64-bit Version 1803
  • atom-ide-ui: 0.12.0
@pelmers
Copy link
Contributor

pelmers commented Jun 7, 2018

Hi @richiksc , I didn't change the project directory fallback since the terminal was ported out of Nuclide. I might get around to this at some point, but if you're interested I'll link the spot you could change to use the Atom projects API as a fallback to Nuclide's. Feel free to tag me for review if you take this on!

you'd probably add an else block here:
https://github.com/facebook-atom/atom-ide-ui/blob/master/modules/atom-ide-ui/pkg/atom-ide-terminal/lib/main.js#L169-L171

@pelmers
Copy link
Contributor

pelmers commented Aug 27, 2018

@jsg2021
Copy link

jsg2021 commented Sep 27, 2018

It would be nice to have this configurable. And maybe have a modifier key stroke to open the alternate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants