diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index d7baa1191..d04d34ea6 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -12,7 +12,7 @@ EOF echo "$the_app" } -function tab() { +function _tab() { # Must not have trailing semicolon, for iTerm compatibility local command="cd \\\"$PWD\\\"; clear" (( $# > 0 )) && command="${command}; $*" @@ -524,6 +524,20 @@ function spotify() { done } +function tab() { + _tab "$PWD/${1-}" +} + +function mtab() { + counter=0 + limit=$1 + while [ "$counter" -lt "$limit" ] + do + _tab "$PWD/${2-}" + counter=$(($counter+1)) + done +} + # Show/hide hidden files in the Finder alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"