atom-terminal icon indicating copy to clipboard operation
atom-terminal copied to clipboard

Clarify settings?

Open peteruithoven opened this issue 8 years ago • 4 comments

Would be great if we could clarify the settings used, for an "outsider" it's currently very hard to predict what influence the options have. I'm mostly talking about:

  • Mac Win Run Directly
  • Set Working Directory
  • Surpress Directory Argument

The biggest problem is that there is no hint on in what situation the different settings should be used.

I've been looking at the code to figure out what to choose. Maybe a preview of the final command could be shown?

I'm more than willing to help out with the wording.

peteruithoven avatar Jul 23 '15 10:07 peteruithoven

@peteruithoven Here is an explanation of the settings. It would be great if you could figure out how to integrate this into the README and submit a pull request.

When we run a terminal app we need to run an application. Additionally, we need to tell it where to open the terminal. Depending on the terminal app you use, this is generally done in one of two ways:

  1. Run the application directly in the directory it should open a terminal in (set the working directory)
  2. Pass it a command line argument containing the given folder

In case your favorite terminal app needs it, you can enable / disable setting the working directory with the "setWorkingDirectory" argument. You can also enable "supressDirectoryArgument" to not pass the directory argument if needed.

On Linux we can just run applications directly. On Mac, we also want to be able to run .app s. These are not executable files directly but are wrapped in a certain way so we need to call them differently. Something similar goes for certain windows applications. To disable this wrapping, you can use the "MacWinRunDirectly" setting.

In general: For most applications, the default settings should just work for you.

Concerning previewing the command line: I like the idea but I think the atom api does not allow anything like that. There was at one point a console.log logging the command being executed to the console though.

tkw1536 avatar Jul 23 '15 10:07 tkw1536

I don't believe adding more documentation is the only solution. I don't know the limitations of creating preferences in Atom, so please tell me if something isn't supported. One of the overall issues is that you reversed the meaning of a lot of your checkboxes, where users have to enable a checkbox to disable something, this can be very confusing.

  • Mac Win Run Directly. Suggestion: Support .app and .exe files, with description: OS X and Windows only. Checked by default.
  • Set Working Directory. Suggestion: Set directory afterwards, with description Using cwd command. Not checked by default.
  • Surpress Directory Argument. (It's suppress btw.) Suggestion: Add directory as argument Checked by default.

A first stab at explaining with the current settings.

1. Starting the terminal Application On OS X we also want to be able to run .app's, which are not executable files but wrappers that need to be started differently. Something similar goes for certain windows applications. To disable this wrapping support, you can enable the Mac Win Run Directly setting. 2. Set location When the target directory can't be added as an argument when starting the terminal application we can set the directory afterwards with a cwd command. To enable this enable Set Working Directory. In most cases the directory can be added as an argument when executing the terminal application, when this doesn't work for your Terminal app you can enable Surpress Directory Argument.

I'd like to add to the Set Working Directory and Surpress Directory Argument explanations, some kind of advice on when these are relevant? Is this more relevant on certain operating systems for example?

peteruithoven avatar Jul 24 '15 08:07 peteruithoven

@peteruithoven Sounds great so far!

The "Set Working Directory" and "suppress Directory Argument" arguments are more relevant for advanced users and likely used only on Mac and Linux and only if you use a non-standard app.

We have per-plaform defaults (see https://github.com/karan/atom-terminal/blob/master/lib/atom-terminal.coffee#L56-L110 ) that work with most applications already. We have tested these settings with the default apps and we keep fixing them when they break.

tkw1536 avatar Jul 24 '15 09:07 tkw1536

Alright. Please let me know if you guys would consider changing the settings. I understand this might be tricky to make backwards compatible.

Second stab at explaining with the current settings.

We have defaults per platform that should work with most terminal applications right away, if they don't you can tweak the settings.

1. Starting the terminal Application

Mac Win Run Directly On OS X we also want to be able to run .app's, which are not executable files but wrappers that need to be started differently. Something similar goes for certain windows applications. To disable this wrapping support, you can enable the Mac Win Run Directly setting.

2. Set location

Set Working Directory When the target directory can't be added as an argument when starting the terminal application we can set the directory afterwards with a cwd command. To enable this enable Set Working Directory. Only relevant when using non-standard terminal apps. Surpress Directory Argument In most cases the directory can be added as an argument when executing the terminal application, when this doesn't work for your terminal app you can enable Surpress Directory Argument. Only relevant when using non-standard terminal apps.

peteruithoven avatar Jul 24 '15 09:07 peteruithoven