Added a function to get your public IP address

pull/3/head
Robert R Evans 2010-10-02 15:23:57 -07:00
parent 1081b7b2e0
commit 070107ab95
5 changed files with 19 additions and 23 deletions

View File

@ -23,8 +23,7 @@ cp template/bash_profile.template.bash ~/.bash_profile
I'm working on adding various custom help screens to bash it. Currently, bash it has the following commands to show help screens: I'm working on adding various custom help screens to bash it. Currently, bash it has the following commands to show help screens:
<pre><code> <pre><code>
bash-it bash-it (will show all the help commands)
plugin-help
rails-help rails-help
git-help git-help
</code></pre> </code></pre>

View File

@ -6,6 +6,13 @@ alias reload='source ~/.bash_profile'
# Load all files # Load all files
# Themes
THEMES="${BASH}/themes/*.bash"
for config_file in $THEMES
do
source $config_file
done
# Library # Library
LIB="${BASH}/lib/*.bash" LIB="${BASH}/lib/*.bash"
for config_file in $LIB for config_file in $LIB
@ -28,13 +35,6 @@ do
source $config_file source $config_file
done done
# Themes
THEMES="${BASH}/themes/*.bash"
for config_file in $THEMES
do
source $config_file
done
# Functions # Functions
FUNCTIONS="${BASH}/functions/*.bash" FUNCTIONS="${BASH}/functions/*.bash"
for config_file in $FUNCTIONS for config_file in $FUNCTIONS

View File

@ -1,13 +1,14 @@
#!/bin/bash #!/bin/bash
function rh {
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
}
function ips { function ips {
ifconfig | grep "inet " | awk '{ print $2 }' ifconfig | grep "inet " | awk '{ print $2 }'
} }
function myip {
res=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+')
echo "Your public IP is: ${LIGHT_GREEN} $res ${NORMAL}"
}
# View man documentation in Preview # View man documentation in Preview
pman () { pman () {

View File

@ -15,3 +15,7 @@ export HISTSIZE=5000
export AUTOFEATURE=true autotest export AUTOFEATURE=true autotest
function rh {
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
}

View File

@ -9,11 +9,3 @@ alias filemerge="open -a '/Developer/Applications/Utilities/FileMerge.app'"
alias safari="open -a safari" alias safari="open -a safari"
alias firefox="open -a firefox" alias firefox="open -a firefox"
alias dashcode="open -a dashcode" alias dashcode="open -a dashcode"
function plugin-help() {
echo "Plugin Help Screen"
echo
rails-help
echo
git-help
}