From d4cae83152d17fd73514532d57fb75a878b651cc Mon Sep 17 00:00:00 2001 From: Matthieu PETIOT Date: Mon, 10 Sep 2018 20:10:31 +0200 Subject: osx: add function to remove .DS_Store files (#7008) rmdsstore removes .DS_Store files recursively in the current directory by default, or for the given directories. --- plugins/osx/osx.plugin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/osx/osx.plugin.zsh') diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index d99cf0b1e..6a4b6eec4 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -209,7 +209,7 @@ if [[ ! -z "$playlist" ]]; then opt="play" else opt="stop" - fi + fi else opt="set allPlaylists to (get name of every playlist)" fi @@ -282,3 +282,8 @@ source ${ZSH}/plugins/osx/spotify # Show/hide hidden files in the Finder alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" alias hidefiles="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" + +# Remove .DS_Store files recursively in a directory, default . +rmdsstore() { + find "${@:-.}" -type f -name .DS_Store -delete +} -- cgit v1.2.3-70-g09d2