Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update C-git-commands.asc with a new TextEdit command #1650

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion C-git-commands.asc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Accompanying the configuration instructions in <<ch01-getting-started#_editor>>,
|Scratch (Linux)|`git config --global core.editor "scratch-text-editor"`
|Sublime Text (macOS) |`git config --global core.editor "/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl --new-window --wait"`
|Sublime Text (Windows 64-bit) |`git config --global core.editor "'C:\Program Files\Sublime Text 3\sublime_text.exe' -w"` (Also see note below)
|TextEdit (macOS)|`git config --global core.editor "open --wait-apps --new -e"`
|TextEdit (macOS)|`git config --global core.editor "open -W -n"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three things:

  1. The -W flag is short for --wait-apps, and -n is short for --new. When we're writing something that will go into a file and be forgotten until we're trying to figure out why it broke, we want to optimize for readability, so I'd prefer we keep the long version of the flags here.
  2. The -e flag specifies that the file should be opened in TextEdit. Without it, you'll get whatever app registers itself as the default app for plain text files. We're specifically trying to get TextEdit here, so removing the -e flag just makes this less specific.
  3. I just tested both variations of this, and they behave the same? You have to actually command-Q the app to make open recognize that it's done, but otherwise I don't see a difference.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping the long version of the flags makes sense.

I'm not sure why we saw a different behavior on our system between these two commands, and I'll see if we can re-test to confirm that we weren't imagining things.

|Textmate |`git config --global core.editor "mate -w"`
|Textpad (Windows 64-bit) |`git config --global core.editor "'C:\Program Files\TextPad 5\TextPad.exe' -m` (Also see note below)
|UltraEdit (Windows 64-bit) | `git config --global core.editor Uedit32`
Expand Down