Skip to content

Commit

Permalink
FLOW3 Log for iterm2
Browse files Browse the repository at this point in the history
  • Loading branch information
skurfuerst committed May 4, 2012
1 parent a7d563b commit 4196850
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
24 changes: 23 additions & 1 deletion flow3.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,26 @@ _f3-update-distribution-path() {
}

# This helper needs to be run initially to set the CDPath correctly
_f3-update-distribution-path
_f3-update-distribution-path

######################################
# Section: Open FLOW3 Log in iTerm 2
######################################

f3logs() {
if _flow3_is_inside_base_distribution; then
else
echo "ERROR: FLOW3 not found inside a parent of current directory"
return 1
fi

local startDirectory=`pwd`
while [ ! -f flow3 ]; do
cd ..
done
local flow3BaseDir=`pwd`
cd $startDirectory

flow3_path="$flow3BaseDir" osascript $ZSH/custom/plugins/flow3/flow3log.applescript

}
31 changes: 31 additions & 0 deletions flow3log.applescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-- iTerm launching script for samo9789

set flow3_path to system attribute "flow3_path"


launch "iTerm"

tell application "iTerm"
activate

-- talk to the new terminal
tell the first terminal

-- create the project tab
launch session "Default"

tell the last session
set name to "SystemLog"
write text "tail -f " & flow3_path & "/Data/Logs/System_Development.log"
end tell

tell i term application "System Events" to keystroke "d" using command down

tell the last session
set name to "SecurityLog"
write text "tail -f " & flow3_path & "/Data/Logs/Security_Development.log"
end tell

end tell

end tell

0 comments on commit 4196850

Please sign in to comment.