Comment by dghf

Comment by dghf 9 hours ago

7 replies

The difficulty in navigating to arbitrary locations in file open/save dialogs.

I wanted to attach a build log to a Teams post (maybe we shouldn't be using Teams on Mac, but it's a corporate decision that's out of my hands), and I could not for the life of me figure how to get the file-selection dialog to look at the relevant folder (which was somewhere under /private/). In the end, I had to use iTerm to copy the file to somewhere the dialog could find.

TurboSkyline 8 hours ago

I would also like a proper address bar in file selection dialogs.

The closest alternative I know of is dragging the target folder from an open Finder window into the dialog. Unlike pretty much any other OS, that doesn’t move the folder, but makes the dialog navigate to it. If you don’t have the folder open in Finder, you can do it with `open .` from a terminal.

rz2k 8 hours ago

It should be more easily discoverable, but command-shift-g lets you type in the path directly, and even has tab completion. If you want to navigate visually, navigate up to the computer or drive where you want to start, then press command-shift-period in order to see all of the directories that are usually hidden.

Both of these approaches work in the open and save dialogs, and not just the Finder.

  • dghf 8 hours ago

    Thank you for the cmd-shift-g tip. That will save me a lot of grief.

    Re your second tip: how do you navigate up? I couldn’t see an obvious way to do that, either.

    • rz2k 8 hours ago

      The title of the current location next to "Where:" is a pop up button which will show you the parent directories. There is also a sidebar that appears if you toggle the small button that is an upside down caret.

    • lukasgraf 7 hours ago

      This is outside the context the "Open File" dialog from your original question, but here's another tip about "navigating up":

      In many application windows you can navigate the hierarchical directory structure that contains the currently open file by right-clicking on the document name/icon in the window's title bar.

      E.g. in Preview, Pages, Finder, ..., hover over the file or directory name in the window's title bar. If you right click on it, a pop-out will appear with a vertical hierarchical list of that file's parent folders. Selecting one of the parent folders will open a new Finder window at that location, allowing you to quickly navigate to a file's containing folder.

      And some additions to the tips in other comments:

      - Dragging a file or directory from finder to the terminal will paste its path onto your shell

      - iTerm has Finder integrations. Right click on a folder in Finder, Services -> New iTerm2 Window Here

      And you might enjoy some of these Finder tweaks from my "dotfiles" (just run them on the shell):

        # Set Documents as the default location for new Finder windows
        # For other paths, use `PfLo` and `file:///full/path/here/`
        defaults write com.apple.finder NewWindowTarget -string "PfDo"
        defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Documents/"
          
        # Finder: show hidden files by default
        defaults write com.apple.finder AppleShowAllFiles -bool true
        
        # Finder: show all filename extensions
        defaults write NSGlobalDomain AppleShowAllExtensions -bool true
        
        # Finder: show status bar
        defaults write com.apple.finder ShowStatusBar -bool true
        
        # Finder: show path bar
        defaults write com.apple.finder ShowPathbar -bool true
        
        # Keep folders on top when sorting by name
        defaults write com.apple.finder _FXSortFoldersFirst -bool true
        
        # Enable spring loading for directories
        defaults write NSGlobalDomain com.apple.springing.enabled -bool true
        
        # Use list view in all Finder windows by default
        # Four-letter codes for the other view modes: `icnv`, `clmv`, `glyv`
        defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
        
        # Show the ~/Library folder
        chflags nohidden ~/Library && xattr -p com.apple.FinderInfo ~/Library 2>/dev/null && xattr -d com.apple.FinderInfo ~/Library
        
        # Show the /Volumes folder
        sudo chflags nohidden /Volumes
        
        # Expand the following File Info panes:
        # “General”, “Open with”, and “Sharing & Permissions”
        defaults write com.apple.finder FXInfoPanesExpanded -dict \
          General -bool true \
          OpenWith -bool true \
          Privileges -bool true
[removed] 4 hours ago
[deleted]