#
# Welcome To Eddie 3.3.4 for Mac OS X
#  Copyright (c) Pavel Císler, @@@COPYRIGHT_DATE@@@, All rights reserved.
#

# Latest version of Eddie available at:
# http://www.el34.com
# - the Eddie website

# This is the Eddie Worksheet, a replacement for Terminal.

# You may type shell commands and hit Return to execute them. Unlike Terminal,
# you can edit and save the Worksheet like any other text document. Users typically
# keep/save commonly used commands in their Worksheet and re-execute as needed.
# When you no longer need the introductory text in the Worksheet, feel free to
# delete it. You may also choose to configure Eddie to read your personal Worksheet
# from alternate locations in the Shell pane in Eddie preferences.

# If you are not a command line type, you can just close the worksheet and set Eddie
# to never open one on Startup in the Preferences.

# To install the latest tellEddie, a command line tool handy for opening documents
# in Eddie from the Terminal or from the Worksheet itself (often handier than using
# the Open panel), execute the following line (place the cursor anywhere on the line
# and hit Return):

sudo cp "$EDDIE_HOME"/tellEddie /usr/local/bin/

# (If you do not have the /usr/local/bin directory yet, you can either use
# /usr/bin or you can create one:)

sudo mkdir -p /usr/local/bin 

# Verify that tellEddie installed properly by executing the following (use Undo
# to remove the help text when you are done reading it):

tellEddie -h		# display tellEddie help

# To learn about latest features added to this version, execute the following:
File "$EDDIE_HOME"/Release\ notes; Line 1

# You may also do this:
cd "$EDDIE_HOME"		# switch to Eddie directory if you aren't there already

# ..., then place the cursor anywhere on the following line:
Release\ notes:1

# ... and hit Command-D (you just used the Smart Open feature).

# To learn more, check out Eddie docs from the Help menu.

# Examples of the flavor of commands you would want to keep handy in your Worksheet:

find . -name "*.cpp" | xargs grep -n CGContextRef	# search all the sources in my project
patch -i diffs -p0 --dry-run				# check the patch file before applying
xcodebuild -buildstyle Debug				# build an XCode project
sort -f < $_TS > $TS_					# sort the selected text in the target window

# To customize your bash environment in an Eddie-friendly way, you may execute some of the following:

# set tellEddie as your EDITOR for svn, cvs and git checkins
printf '\nexport EDITOR="tellEddie -w -x --resetSelection"\n' >> ~/.bashrc

# configure a handy alias for tellEddie
printf '\nalias e=tellEddie\n' >> ~/.bashrc

# configure bash prompt to show current directory
printf '\nexport PS1="\w: "\n' >> ~/.bashrc

# configure ~/.bash_profile to source ~/.bashrc (needed for any commands in .bashrc to take effect)
printf  '\n. ~/.bashrc\n' >> ~/.bash_profile

# define a handy search shortcut
printf "\nfindsource () \n { find $1 \(  -name \"*.h\" -o -name \"*.h.r\" -o -name \"*.cp\" -o -name \"*.cpp\" -o -name \"*.mm\" -o -name \"*.c\" -o -name \"*.m\" -o -name \"*.pch\" -o -name \"*.i\" -o -name \"*.l\" -o -name \"*.y\" -o -name \"*.rl\" \) -and \! \( -path \"*/build/*\" \) \n }\n" >> ~/.bashrc

# to use findsource, leave this line in your worksheet:
findsource . | xargs grep -n Find_this

