Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Finder -> Preferences -> Advanced.

When performing a search:

Search the current folder



If you have a setup script add the following to set this automatically:

    defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"


I'm interested in what you mean by "setup script" - I assume you have a script of some sort you run when / if you re-install the OS? I'd love to hear more about this!


I have a simple shell script that does a bunch of setup for me to automate things.

It grabs my dot files and restores them, installs Homebrew and a bunch of programs, restores their plists (I have backup script that backs up all their plists) and writes a bunch of macOS settings via the `defaults write` command.

I can install/wipe macOS, follow the initial setting screens then when on the desktop I just connect to my NAS, copy over one script and run it in the Terminal to get my machine setup how I like it. It isn't perfect but it does about 97% of the work for me with the added bonus that it is consistent/reproducible for the most part so avoids me forgetting to change a setting some place.

I don't go crazy with it as I don't wipe my machine often enough to justify going all out with a fully automated system. Honestly it is less to save time and more to maintain consistency and have a 'documented as code' record of my environment setup (not quite infrastructure as code levels :)


Look up dotfiles on GitHub - for example https://github.com/mathiasbynens/dotfiles/blob/main/.macos


Oh, my!

  # Trackpad: enable tap to click for this user and for the login screen

  # Trackpad: map bottom right corner to right-click

  # Disable “natural” (Lion-style) scrolling


Tap to click is an abomination. I have no love left for Apple, but their trackpads are orders of magnitude better than anyone else's in the industry.

Have you tried using the trackpad at its default settings? They actually make a ton of sense.


ha-ha imagine dragging things with two fingers PRESSED INTO TRACKPAD instead of beautiful (yet hidden deeply in settings) three-finger drag

this is old-lenovo-hacker style


I added a PR to fix rsync, mosh, and some other tools, since they will be broken out of the box.

But it seems this project has fallen behind on PRs.

If you would like to have this fix, you can do this after cloning the repo:

  git clone https://github.com/mathiasbynens/dotfiles && cd dotfiles

  git fetch origin "+refs/pull/*/head:refs/remotes/origin/pr/*" && git cherry-pick origin/pr/963


Agreed. Its an embarrasment.

Use Alfred; I've been using it for years (10 maybe?) -- solves this problem and is extremely useful in general


Alfred (https://www.alfredapp.com/) and BetterTouchTool (https://folivora.ai/) really are two of the must-haves for every mac.


I have a lifetime/powerpack Alfred license, and i don't use it much, if at all. I have it installed, but in my experience Spotlight has gotten a lot better in recent years, at least to the point where i just use that.

My only excuse for using Alfred is Dash (https://kapeli.com/dash), which integrates with Alfred, but these days so does just about every editor i use (including Vim, Emacs and Sublime Text), so i very rarely find myself using Alfred for it anymore.

One tool i do use at lot though is Hook (https://hookproductivity.com/).


> BetterTouchTool

Physical function keys are a must-have for every mac imo


BTT does work with the TouchBar, but the "Touch" in the name comes from "touchpad" since it originally was used to add various macros/gestures to the touchpad and mouse. TouchBar support was added later.

Most new Macs come with full-size function keys, including a massive escape key the same size as the tab key. (At least on the en-US layout; can't speak to others.)


> > BetterTouchTool

> Physical function keys are a must-have for every mac imo

While it wasn't the case for a while, they all do now.


TipTap mapped to ctrl+tab oh lordy


Interesting. What other gestures do you use? I've tried to setup BTT to emulate cmd+tab with swipe right or left but it wasn't a smooth experience so I've made Touch-Tab https://github.com/ris58h/Touch-Tab


Made a mistake, I use TipTap for ctrl+tab aka switching tabs in browsers and IDE's.

Also four finger press for cmd+`


I used Alfred for 10+ years as well, but am a recent Raycast convert. Much larger and easier to use extension ecosystem, and looks nicer too IMO.


Raycast looks really interesting. Is there anything you miss from Alfred?


Nope, I installed a few extensions to replicate things I had in Alfred, and got a few new features for free


It’s an easy configuration change to default the search to the current folder. Alfred is great on it’s own but not needed to fix this.


+1 for Alfred. Amazing software.


++2 for Alfred. AND it has plugins so you can search your Chrome or Brave tabs with Alfred as well. I just hit CMD + Shift + T and it'll search all my open tabs without the browser being in focus. I had to pay but it wasn't much. Use it everyday! https://github.com/epilande/alfred-browser-tabs


oooh, I hadn't seen that plugin before; nice


wow - how is this not the default? It's always the behavior that I expect to happen, and I'm pretty much always surprised and disappointed when it does a global search instead.


> how is this not the default?

This is just speculation, but based on a conversation with my partner, there are two types of computer users. The first group makes use of hierarchical storage, consistent naming conventions, and other organizational tricks to give them a rough idea of where any file might be. The second group has never heard the term "file systems" and just stores everything with an arbitrary name in whatever location the originating application uses by default.

The first group would prefer to search the given directory, because the supplied context (of which folder to start the search in) drastically improves/speeds search results. The second group prefers to search the entire disk, because supplying that additional context is impossible - any file might appear anywhere.

The set intersection between the first group and "people who change their default settings" is much higher than it is with the second group. Consequently, the whole disk search is enabled by default.

Additionally, given the addition of an "All My Files" view in Finder (a feature which the first group would probably find baffling), Apple may also believe that the latter group outnumbers the former.


Reminds me of this Verge article reporting that kids growing up with iPhones don’t know what files or directories are: https://www.theverge.com/22684730/students-file-folder-direc...


Very much an intentional goal of the OS when it came out, the hope being that the concepts of files and folders might never be needed. A bold move to get rid of a mental overhead for using a computer that was never natural or intuitive to non-tech users. They eventually had to back off a bit, but it’s an amazing accomplishment that most users can still use these devices as if files weren’t a thing.


How long do you think that IT professionals will need to care about hierarchical file systems?


Yeah this is true, friends that are professors say they now have to have a basic class early in the semester that explains folders, files, and other basics to students.


Funny, I'm in the first group but I'd much rather have it search everything by default: because I organize my files, if I'm searching for one that means that I don't know where it is, so I need to look everywhere.


To me this is definitely it. Using non-technical people's computers is eye-opening. Thousands of files scattered around on the Desktop, Documents, or wherever they just happened to go. Finding something in a specific directory would be a completely foreign concept.


Well, count me in the third group: I make use of hierarchical storage, consistent naming conventions, and other organizational tricks to give me a rough idea of where any file might be. I also fail miserably at it (apart from dev/programming stuff, which all is in `~/dev/<project name>`) and rely heavily on search to find anything again.

As search is fast enough nowadays with indexing, I'd rather have it search the whole disk every time than the directory I'm in just to realize I've put it someplace else.


Funny enough, I'm in the first group but prefer Finder's default behavior for the second group.


Windows also defaults to full text file searches instead of filenames, which is super annoying when you have thousands upon thousands of documents. It's often faster to open a terminal window, type 'dir search string and open the file from the terminal.


Try everything search [0], I don't think I could use windows without it. Just search filenames, instant, whole disk.

[0] https://www.voidtools.com/support/everything/


Seconded. This is a killer app. I can't imagine using Windows without it.


Especially when global search is only ever a Cmd-Space away.


The other comments make a good point about it being optimized for dumbasses that don't even understand the basic concepts of file management.

Maybe we need a name for this behavior, I propose "idiot-driven-development".


Thanks!! Having it search my mac by default was a mild annoyance (you can click search current folder once the search starts). But this is helpful


Why isn't this the default setting? I mean, who searches their entire machine when they're inside a folder?


@hwbehrens lays out the likely reason in an earlier post https://news.ycombinator.com/item?id=33321978

Short answer Large number of users don’t use folders to organize their files. They just depend on searching everywhere to find files that may have dropped in any random location. Those people are less likely to find the setting that makes current folder the default search target.


That searches the _contents_ of the files in the current folder. I just want to search the names (the way Cmd-F works in, you know, every other application: it searches what you see in the window).


also `mdfind whatever` if you prefer the CLI


If you want by name `mdfind -name whatever`.


also fd, brew install fd


Hilarious this is not default. Thanks.


Well yes but in Ventura "Preferences" is now "Settings".

¯\_(ツ)_/¯




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: