Add mtab command to osx integration

```
mtab count [path]
```

It's exactly like `tab`, excepting it runs for `count`, so you can quickly open several of the same tab.
This commit is contained in:
Micheil Smith 2014-06-20 10:40:24 +01:00 committed by Micheil (Em) Smith
commit 6d6b60dee7

View file

@ -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"