mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
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:
parent
3477ff2527
commit
6d6b60dee7
1 changed files with 15 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ EOF
|
||||||
echo "$the_app"
|
echo "$the_app"
|
||||||
}
|
}
|
||||||
|
|
||||||
function tab() {
|
function _tab() {
|
||||||
# Must not have trailing semicolon, for iTerm compatibility
|
# Must not have trailing semicolon, for iTerm compatibility
|
||||||
local command="cd \\\"$PWD\\\"; clear"
|
local command="cd \\\"$PWD\\\"; clear"
|
||||||
(( $# > 0 )) && command="${command}; $*"
|
(( $# > 0 )) && command="${command}; $*"
|
||||||
|
|
@ -524,6 +524,20 @@ function spotify() {
|
||||||
done
|
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
|
# Show/hide hidden files in the Finder
|
||||||
alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
|
alias showfiles="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue