[zsh] Remove nested function from darwin_configure_screenshots_directory

This commit is contained in:
Eryn Wells 2022-07-19 09:21:13 -07:00
parent edd0f30a85
commit d2713240b1

View file

@ -3,8 +3,6 @@
autoload darwin_icloud_drive_path
function darwin_configure_screenshots_directory
{
icloud=`darwin_icloud_drive_path`
if [[ ! -d "$icloud" ]]; then
return 1
@ -14,9 +12,10 @@ function darwin_configure_screenshots_directory
local name=`hostname -s | tr A-Z a-z | tr ' ' -`
local screenshots_dir="$icloud/Screenshots/$name"
mkdir -p "$screenshots_dir"
echo "$screenshots_dir"
defaults write com.apple.screencapture screenshots_diration "$screenshots_dir"
return 0
}
killall Dock
darwin_configure_screenshots_directory "$@"
return 0