I make a lot of presentations that involve many screenshots, and I want an easier way to organize them by project. I'm trying to write a simple function that changes the location where screenshots are saved to the current working directory.
I've written a function in and saved it to ~/.my_custom_commands.sh.
That file currently looks like this:
#!/bin/bash
# changes location of screenshot to current directory
function shoothere() {
defaults write com.apple.screencapture location '. '
killall SystemUIServer
echo 'foo'
}
When I navigate to the directory where I want to save my screenshots and run the function, it does print foo but screenshots do not appear anywhere.
I've also tried replacing '. ' with $1 and running it as $ shoothere ., at which point I get an error Rep argument is not a dictionary. Defaults have not been changed. Googling this error message has gotten me precisely nowhere.
I'm on a Mac running Mojave 10.14.4.