vim: save to macOS clipboard
:w !pbcopy
Small things I've learned — code, commands, manual page nuggets. Not (yet) listed on the front page.
:w !pbcopy
LIBPROC_HIDE_KERNEL=1 top
Although the question has aged a bit, there is an interesting new approach: Since version 4 of the procps package, you can set the environment variable
LIBPROC_HIDE_KERNEL. If set, ps(1) and top(1) will display user space processes, only.
Source: unix.stackexchange.com
duti takes a bundle identifier and binds it to a file extension (or
UTI). Combine it with osascript to look up the bundle id of the app
you actually have installed.
brew install duti
# Figure out the bundle id of the app you want.
osascript -e 'id of app "Zed"'
# Bind .yml files to that app, for all roles (viewer + editor).
duti -s "$(osascript -e 'id of app "Zed"')" .yml all