... | ... |
@@ -12,7 +12,7 @@ for config_file ($ZSH/custom/*.zsh) source $config_file |
12 | 12 |
|
13 | 13 |
# Load all of the plugins that were defined in ~/.zshrc |
14 | 14 |
plugin=${plugin:=()} |
15 |
-for plugin ($plugins) source $ZSH/plugins/$plugin.plugin.zsh |
|
15 |
+for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh |
|
16 | 16 |
|
17 | 17 |
# Check for updates on initial load... |
18 | 18 |
if [ "$DISABLE_AUTO_UPDATE" = "true" ] |
19 | 19 |
deleted file mode 100644 |
... | ... |
@@ -1,67 +0,0 @@ |
1 |
-#compdef brew |
|
2 |
- |
|
3 |
-# imported from the latest homebrew contributions |
|
4 |
- |
|
5 |
-_brew_all_formulae() { |
|
6 |
- formulae=(`brew search`) |
|
7 |
-} |
|
8 |
- |
|
9 |
-_brew_installed_formulae() { |
|
10 |
- installed_formulae=(`brew list`) |
|
11 |
-} |
|
12 |
- |
|
13 |
-local -a _1st_arguments |
|
14 |
-_1st_arguments=( |
|
15 |
- 'cat:display formula file for a formula' |
|
16 |
- 'cleanup:uninstall unused and old versions of packages' |
|
17 |
- 'create:create a new formula' |
|
18 |
- 'deps:list dependencies and dependants of a formula' |
|
19 |
- 'doctor:audits your installation for common issues' |
|
20 |
- 'edit:edit a formula' |
|
21 |
- 'home:visit the homepage of a formula or the brew project' |
|
22 |
- 'info:information about a formula' |
|
23 |
- 'install:install a formula' |
|
24 |
- 'link:link a formula' |
|
25 |
- 'list:list files in a formula or not-installed formulae' |
|
26 |
- 'log:git commit log for a formula' |
|
27 |
- 'outdated:list formulas for which a newer version is available' |
|
28 |
- 'prune:remove dead links' |
|
29 |
- 'remove:remove a formula' |
|
30 |
- 'search:search for a formula (/regex/ or string)' |
|
31 |
- 'unlink:unlink a formula' |
|
32 |
- 'update:freshen up links' |
|
33 |
- 'uses:show formulas which depend on a formula' |
|
34 |
-) |
|
35 |
- |
|
36 |
-local expl |
|
37 |
-local -a formula installed_formulae |
|
38 |
- |
|
39 |
-_arguments \ |
|
40 |
- '(-v --verbose)'{-v,--verbose}'[verbose]' \ |
|
41 |
- '(--version)--version[version information]' \ |
|
42 |
- '(--prefix)--prefix[where brew lives on this system]' \ |
|
43 |
- '(--cache)--cache[brew cache]' \ |
|
44 |
- '*:: :->subcmds' && return 0 |
|
45 |
- |
|
46 |
-if (( CURRENT == 1 )); then |
|
47 |
- _describe -t commands "brew subcommand" _1st_arguments |
|
48 |
- return |
|
49 |
-fi |
|
50 |
- |
|
51 |
-case "$words[1]" in |
|
52 |
- list) |
|
53 |
- _arguments \ |
|
54 |
- '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ |
|
55 |
- '1: :->forms' && return 0 |
|
56 |
- |
|
57 |
- if [[ "$state" == forms ]]; then |
|
58 |
- _brew_installed_formulae |
|
59 |
- _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae |
|
60 |
- fi ;; |
|
61 |
- install|home|log|info|uses|cat|deps) |
|
62 |
- _brew_all_formulae |
|
63 |
- _wanted formulae expl 'all formulae' compadd -a formulae ;; |
|
64 |
- remove|edit|xo) |
|
65 |
- _brew_installed_formulae |
|
66 |
- _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; |
|
67 |
-esac |
68 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,67 @@ |
0 |
+#compdef brew |
|
1 |
+ |
|
2 |
+# imported from the latest homebrew contributions |
|
3 |
+ |
|
4 |
+_brew_all_formulae() { |
|
5 |
+ formulae=(`brew search`) |
|
6 |
+} |
|
7 |
+ |
|
8 |
+_brew_installed_formulae() { |
|
9 |
+ installed_formulae=(`brew list`) |
|
10 |
+} |
|
11 |
+ |
|
12 |
+local -a _1st_arguments |
|
13 |
+_1st_arguments=( |
|
14 |
+ 'cat:display formula file for a formula' |
|
15 |
+ 'cleanup:uninstall unused and old versions of packages' |
|
16 |
+ 'create:create a new formula' |
|
17 |
+ 'deps:list dependencies and dependants of a formula' |
|
18 |
+ 'doctor:audits your installation for common issues' |
|
19 |
+ 'edit:edit a formula' |
|
20 |
+ 'home:visit the homepage of a formula or the brew project' |
|
21 |
+ 'info:information about a formula' |
|
22 |
+ 'install:install a formula' |
|
23 |
+ 'link:link a formula' |
|
24 |
+ 'list:list files in a formula or not-installed formulae' |
|
25 |
+ 'log:git commit log for a formula' |
|
26 |
+ 'outdated:list formulas for which a newer version is available' |
|
27 |
+ 'prune:remove dead links' |
|
28 |
+ 'remove:remove a formula' |
|
29 |
+ 'search:search for a formula (/regex/ or string)' |
|
30 |
+ 'unlink:unlink a formula' |
|
31 |
+ 'update:freshen up links' |
|
32 |
+ 'uses:show formulas which depend on a formula' |
|
33 |
+) |
|
34 |
+ |
|
35 |
+local expl |
|
36 |
+local -a formula installed_formulae |
|
37 |
+ |
|
38 |
+_arguments \ |
|
39 |
+ '(-v --verbose)'{-v,--verbose}'[verbose]' \ |
|
40 |
+ '(--version)--version[version information]' \ |
|
41 |
+ '(--prefix)--prefix[where brew lives on this system]' \ |
|
42 |
+ '(--cache)--cache[brew cache]' \ |
|
43 |
+ '*:: :->subcmds' && return 0 |
|
44 |
+ |
|
45 |
+if (( CURRENT == 1 )); then |
|
46 |
+ _describe -t commands "brew subcommand" _1st_arguments |
|
47 |
+ return |
|
48 |
+fi |
|
49 |
+ |
|
50 |
+case "$words[1]" in |
|
51 |
+ list) |
|
52 |
+ _arguments \ |
|
53 |
+ '(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \ |
|
54 |
+ '1: :->forms' && return 0 |
|
55 |
+ |
|
56 |
+ if [[ "$state" == forms ]]; then |
|
57 |
+ _brew_installed_formulae |
|
58 |
+ _requested installed_formulae expl 'installed formulae' compadd -a installed_formulae |
|
59 |
+ fi ;; |
|
60 |
+ install|home|log|info|uses|cat|deps) |
|
61 |
+ _brew_all_formulae |
|
62 |
+ _wanted formulae expl 'all formulae' compadd -a formulae ;; |
|
63 |
+ remove|edit|xo) |
|
64 |
+ _brew_installed_formulae |
|
65 |
+ _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;; |
|
66 |
+esac |
0 | 67 |
deleted file mode 100644 |
... | ... |
@@ -1,39 +0,0 @@ |
1 |
-#!/bin/zsh |
|
2 |
-# |
|
3 |
-# Make the dirstack more persistant |
|
4 |
-# |
|
5 |
-# Add dirpersist to $plugins in ~/.zshrc to load |
|
6 |
-# |
|
7 |
- |
|
8 |
-# $zdirstore is the file used to persist the stack |
|
9 |
-zdirstore=~/.zdirstore |
|
10 |
- |
|
11 |
-dirpersistinstall () { |
|
12 |
- if grep 'dirpersiststore' ~/.zlogout > /dev/null; then |
|
13 |
- else |
|
14 |
- if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then |
|
15 |
- echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout |
|
16 |
- else |
|
17 |
- echo "If you don't want this message to appear, remove dirspersist from \$plugins" |
|
18 |
- fi |
|
19 |
- fi |
|
20 |
-} |
|
21 |
- |
|
22 |
-dirpersiststore () { |
|
23 |
- dirs -p | perl -e 'foreach (reverse <STDIN>) {chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"}' > $zdirstore |
|
24 |
-} |
|
25 |
- |
|
26 |
-dirpersistrestore () { |
|
27 |
- if [ -f $zdirstore ]; then |
|
28 |
- source $zdirstore |
|
29 |
- fi |
|
30 |
-} |
|
31 |
- |
|
32 |
-DIRSTACKSIZE=10 |
|
33 |
-setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups |
|
34 |
- |
|
35 |
-dirpersistinstall |
|
36 |
-dirpersistrestore |
|
37 |
- |
|
38 |
-# Make popd changes permanent without having to wait for logout |
|
39 |
-alias popd="popd;dirpersiststore" |
40 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,39 @@ |
0 |
+#!/bin/zsh |
|
1 |
+# |
|
2 |
+# Make the dirstack more persistant |
|
3 |
+# |
|
4 |
+# Add dirpersist to $plugins in ~/.zshrc to load |
|
5 |
+# |
|
6 |
+ |
|
7 |
+# $zdirstore is the file used to persist the stack |
|
8 |
+zdirstore=~/.zdirstore |
|
9 |
+ |
|
10 |
+dirpersistinstall () { |
|
11 |
+ if grep 'dirpersiststore' ~/.zlogout > /dev/null; then |
|
12 |
+ else |
|
13 |
+ if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then |
|
14 |
+ echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout |
|
15 |
+ else |
|
16 |
+ echo "If you don't want this message to appear, remove dirspersist from \$plugins" |
|
17 |
+ fi |
|
18 |
+ fi |
|
19 |
+} |
|
20 |
+ |
|
21 |
+dirpersiststore () { |
|
22 |
+ dirs -p | perl -e 'foreach (reverse <STDIN>) {chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"}' > $zdirstore |
|
23 |
+} |
|
24 |
+ |
|
25 |
+dirpersistrestore () { |
|
26 |
+ if [ -f $zdirstore ]; then |
|
27 |
+ source $zdirstore |
|
28 |
+ fi |
|
29 |
+} |
|
30 |
+ |
|
31 |
+DIRSTACKSIZE=10 |
|
32 |
+setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups |
|
33 |
+ |
|
34 |
+dirpersistinstall |
|
35 |
+dirpersistrestore |
|
36 |
+ |
|
37 |
+# Make popd changes permanent without having to wait for logout |
|
38 |
+alias popd="popd;dirpersiststore" |
0 | 39 |
deleted file mode 100644 |
... | ... |
@@ -1,32 +0,0 @@ |
1 |
-# Aliases |
|
2 |
-alias g='git' |
|
3 |
-alias gst='git status' |
|
4 |
-alias gl='git pull' |
|
5 |
-alias gup='git fetch && git rebase' |
|
6 |
-alias gp='git push' |
|
7 |
-alias gd='git diff | mate' |
|
8 |
-alias gdv='git diff -w "$@" | vim -R -' |
|
9 |
-alias gc='git commit -v' |
|
10 |
-alias gca='git commit -v -a' |
|
11 |
-alias gb='git branch' |
|
12 |
-alias gba='git branch -a' |
|
13 |
-alias gcount='git shortlog -sn' |
|
14 |
-alias gcp='git cherry-pick' |
|
15 |
- |
|
16 |
- |
|
17 |
-# Git and svn mix |
|
18 |
-alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' |
|
19 |
- |
|
20 |
-# |
|
21 |
-# Will return the current branch name |
|
22 |
-# Usage example: git pull origin $(current_branch) |
|
23 |
-# |
|
24 |
-function current_branch() { |
|
25 |
- ref=$(git symbolic-ref HEAD 2> /dev/null) || return |
|
26 |
- echo ${ref#refs/heads/} |
|
27 |
-} |
|
28 |
- |
|
29 |
-# these aliases take advangate of the previous function |
|
30 |
-alias ggpull='git pull origin $(current_branch)' |
|
31 |
-alias ggpush='git push origin $(current_branch)' |
|
32 |
-alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' |
|
33 | 1 |
\ No newline at end of file |
34 | 2 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,32 @@ |
0 |
+# Aliases |
|
1 |
+alias g='git' |
|
2 |
+alias gst='git status' |
|
3 |
+alias gl='git pull' |
|
4 |
+alias gup='git fetch && git rebase' |
|
5 |
+alias gp='git push' |
|
6 |
+alias gd='git diff | mate' |
|
7 |
+alias gdv='git diff -w "$@" | vim -R -' |
|
8 |
+alias gc='git commit -v' |
|
9 |
+alias gca='git commit -v -a' |
|
10 |
+alias gb='git branch' |
|
11 |
+alias gba='git branch -a' |
|
12 |
+alias gcount='git shortlog -sn' |
|
13 |
+alias gcp='git cherry-pick' |
|
14 |
+ |
|
15 |
+ |
|
16 |
+# Git and svn mix |
|
17 |
+alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' |
|
18 |
+ |
|
19 |
+# |
|
20 |
+# Will return the current branch name |
|
21 |
+# Usage example: git pull origin $(current_branch) |
|
22 |
+# |
|
23 |
+function current_branch() { |
|
24 |
+ ref=$(git symbolic-ref HEAD 2> /dev/null) || return |
|
25 |
+ echo ${ref#refs/heads/} |
|
26 |
+} |
|
27 |
+ |
|
28 |
+# these aliases take advangate of the previous function |
|
29 |
+alias ggpull='git pull origin $(current_branch)' |
|
30 |
+alias ggpush='git push origin $(current_branch)' |
|
31 |
+alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' |
|
0 | 32 |
\ No newline at end of file |
1 | 33 |
deleted file mode 100644 |
... | ... |
@@ -1,16 +0,0 @@ |
1 |
-# To use: add a .lighthouse file into your directory with the URL to the |
|
2 |
-# individual project. For example: |
|
3 |
-# https://rails.lighthouseapp.com/projects/8994 |
|
4 |
-# Example usage: http://screencast.com/t/ZDgwNDUwNT |
|
5 |
-open_lighthouse_ticket () { |
|
6 |
- if [ ! -f .lighthouse-url ]; then |
|
7 |
- echo "There is no .lighthouse file in the current directory..." |
|
8 |
- return 0; |
|
9 |
- else |
|
10 |
- lighthouse_url=$(cat .lighthouse-url); |
|
11 |
- echo "Opening ticket #$1"; |
|
12 |
- `open $lighthouse_url/tickets/$1`; |
|
13 |
- fi |
|
14 |
-} |
|
15 |
- |
|
16 |
-alias lho='open_lighthouse_ticket' |
|
17 | 1 |
\ No newline at end of file |
18 | 2 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,16 @@ |
0 |
+# To use: add a .lighthouse file into your directory with the URL to the |
|
1 |
+# individual project. For example: |
|
2 |
+# https://rails.lighthouseapp.com/projects/8994 |
|
3 |
+# Example usage: http://screencast.com/t/ZDgwNDUwNT |
|
4 |
+open_lighthouse_ticket () { |
|
5 |
+ if [ ! -f .lighthouse-url ]; then |
|
6 |
+ echo "There is no .lighthouse file in the current directory..." |
|
7 |
+ return 0; |
|
8 |
+ else |
|
9 |
+ lighthouse_url=$(cat .lighthouse-url); |
|
10 |
+ echo "Opening ticket #$1"; |
|
11 |
+ `open $lighthouse_url/tickets/$1`; |
|
12 |
+ fi |
|
13 |
+} |
|
14 |
+ |
|
15 |
+alias lho='open_lighthouse_ticket' |
|
0 | 16 |
\ No newline at end of file |
0 | 7 |
deleted file mode 100644 |
... | ... |
@@ -1,6 +0,0 @@ |
1 |
-# commands to control local mysql-server installation |
|
2 |
-# paths are for osx installtion via macports |
|
3 |
- |
|
4 |
-alias mysqlstart='sudo /opt/local/bin/mysqld_safe5' |
|
5 |
-alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown' |
|
6 |
-alias mysqlstatus='mysqladmin5 -u root -p ping' |
|
7 | 1 |
\ No newline at end of file |
8 | 2 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,6 @@ |
0 |
+# commands to control local mysql-server installation |
|
1 |
+# paths are for osx installtion via macports |
|
2 |
+ |
|
3 |
+alias mysqlstart='sudo /opt/local/bin/mysqld_safe5' |
|
4 |
+alias mysqlstop='/opt/local/bin/mysqladmin5 -u root -p shutdown' |
|
5 |
+alias mysqlstatus='mysqladmin5 -u root -p ping' |
|
0 | 6 |
\ No newline at end of file |
1 | 7 |
deleted file mode 100644 |
... | ... |
@@ -1,11 +0,0 @@ |
1 |
-function tab() { |
|
2 |
- osascript 2>/dev/null <<EOF |
|
3 |
- tell application "System Events" |
|
4 |
- tell process "Terminal" to keystroke "t" using command down |
|
5 |
- end |
|
6 |
- tell application "Terminal" |
|
7 |
- activate |
|
8 |
- do script with command "cd \"$PWD\"; $*" in window 1 |
|
9 |
- end tell |
|
10 |
-EOF |
|
11 |
-} |
|
12 | 1 |
\ No newline at end of file |
13 | 2 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,11 @@ |
0 |
+function tab() { |
|
1 |
+ osascript 2>/dev/null <<EOF |
|
2 |
+ tell application "System Events" |
|
3 |
+ tell process "Terminal" to keystroke "t" using command down |
|
4 |
+ end |
|
5 |
+ tell application "Terminal" |
|
6 |
+ activate |
|
7 |
+ do script with command "cd \"$PWD\"; $*" in window 1 |
|
8 |
+ end tell |
|
9 |
+EOF |
|
10 |
+} |
|
0 | 11 |
\ No newline at end of file |
1 | 12 |
deleted file mode 100644 |
... | ... |
@@ -1,36 +0,0 @@ |
1 |
- |
|
2 |
-alias ss='thin --stats "/thin/stats" start' |
|
3 |
-alias sg='ruby script/generate' |
|
4 |
-alias sd='ruby script/destroy' |
|
5 |
-alias sp='ruby script/plugin' |
|
6 |
-alias ssp='ruby script/spec' |
|
7 |
-alias rdbm='rake db:migrate' |
|
8 |
-alias sc='ruby script/console' |
|
9 |
-alias sd='ruby script/server --debugger' |
|
10 |
-alias devlog='tail -f log/development.log' |
|
11 |
- |
|
12 |
-function _cap_does_task_list_need_generating () { |
|
13 |
- if [ ! -f .cap_tasks~ ]; then return 0; |
|
14 |
- else |
|
15 |
- accurate=$(stat -f%m .cap_tasks~) |
|
16 |
- changed=$(stat -f%m config/deploy.rb) |
|
17 |
- return $(expr $accurate '>=' $changed) |
|
18 |
- fi |
|
19 |
-} |
|
20 |
- |
|
21 |
-function _cap () { |
|
22 |
- if [ -f config/deploy.rb ]; then |
|
23 |
- if _cap_does_task_list_need_generating; then |
|
24 |
- echo "\nGenerating .cap_tasks~..." > /dev/stderr |
|
25 |
- cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' |
|
26 |
-> .cap_tasks~ |
|
27 |
- fi |
|
28 |
- compadd `cat .cap_tasks~` |
|
29 |
- fi |
|
30 |
-} |
|
31 |
- |
|
32 |
-compctl -K _cap cap |
|
33 |
- |
|
34 |
-function remote_console() { |
|
35 |
- /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" |
|
36 |
-} |
37 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,36 @@ |
0 |
+ |
|
1 |
+alias ss='thin --stats "/thin/stats" start' |
|
2 |
+alias sg='ruby script/generate' |
|
3 |
+alias sd='ruby script/destroy' |
|
4 |
+alias sp='ruby script/plugin' |
|
5 |
+alias ssp='ruby script/spec' |
|
6 |
+alias rdbm='rake db:migrate' |
|
7 |
+alias sc='ruby script/console' |
|
8 |
+alias sd='ruby script/server --debugger' |
|
9 |
+alias devlog='tail -f log/development.log' |
|
10 |
+ |
|
11 |
+function _cap_does_task_list_need_generating () { |
|
12 |
+ if [ ! -f .cap_tasks~ ]; then return 0; |
|
13 |
+ else |
|
14 |
+ accurate=$(stat -f%m .cap_tasks~) |
|
15 |
+ changed=$(stat -f%m config/deploy.rb) |
|
16 |
+ return $(expr $accurate '>=' $changed) |
|
17 |
+ fi |
|
18 |
+} |
|
19 |
+ |
|
20 |
+function _cap () { |
|
21 |
+ if [ -f config/deploy.rb ]; then |
|
22 |
+ if _cap_does_task_list_need_generating; then |
|
23 |
+ echo "\nGenerating .cap_tasks~..." > /dev/stderr |
|
24 |
+ cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D' |
|
25 |
+> .cap_tasks~ |
|
26 |
+ fi |
|
27 |
+ compadd `cat .cap_tasks~` |
|
28 |
+ fi |
|
29 |
+} |
|
30 |
+ |
|
31 |
+compctl -K _cap cap |
|
32 |
+ |
|
33 |
+function remote_console() { |
|
34 |
+ /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" |
|
35 |
+} |
1 | 5 |
deleted file mode 100644 |
... | ... |
@@ -1,23 +0,0 @@ |
1 |
-# Based on code from Joseph M. Reagle |
|
2 |
-# http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html |
|
3 |
- |
|
4 |
-local SSH_ENV=$HOME/.ssh/environment |
|
5 |
- |
|
6 |
-function start_agent { |
|
7 |
- /usr/bin/env ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} |
|
8 |
- chmod 600 ${SSH_ENV} |
|
9 |
- . ${SSH_ENV} > /dev/null |
|
10 |
- /usr/bin/ssh-add; |
|
11 |
-} |
|
12 |
- |
|
13 |
-# Source SSH settings, if applicable |
|
14 |
- |
|
15 |
-if [ -f "${SSH_ENV}" ]; then |
|
16 |
- . ${SSH_ENV} > /dev/null |
|
17 |
- ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { |
|
18 |
- start_agent; |
|
19 |
- } |
|
20 |
-else |
|
21 |
- start_agent; |
|
22 |
-fi |
|
23 |
- |
24 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,23 @@ |
0 |
+# Based on code from Joseph M. Reagle |
|
1 |
+# http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html |
|
2 |
+ |
|
3 |
+local SSH_ENV=$HOME/.ssh/environment |
|
4 |
+ |
|
5 |
+function start_agent { |
|
6 |
+ /usr/bin/env ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} |
|
7 |
+ chmod 600 ${SSH_ENV} |
|
8 |
+ . ${SSH_ENV} > /dev/null |
|
9 |
+ /usr/bin/ssh-add; |
|
10 |
+} |
|
11 |
+ |
|
12 |
+# Source SSH settings, if applicable |
|
13 |
+ |
|
14 |
+if [ -f "${SSH_ENV}" ]; then |
|
15 |
+ . ${SSH_ENV} > /dev/null |
|
16 |
+ ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { |
|
17 |
+ start_agent; |
|
18 |
+ } |
|
19 |
+else |
|
20 |
+ start_agent; |
|
21 |
+fi |
|
22 |
+ |
0 | 23 |
deleted file mode 100644 |
... | ... |
@@ -1,14 +0,0 @@ |
1 |
- |
|
2 |
-# TextMate |
|
3 |
-alias et='mate . &' |
|
4 |
-alias ett='mate app config lib db public spec test Rakefile Capfile Todo &' |
|
5 |
-alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' |
|
6 |
-alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' |
|
7 |
- |
|
8 |
-# Editor Ruby file in TextMate |
|
9 |
-alias mr='mate CHANGELOG app config db lib public script spec test' |
|
10 |
- |
|
11 |
-function tm() { |
|
12 |
- cd $1 |
|
13 |
- mate $1 |
|
14 |
-} |
15 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,14 @@ |
0 |
+ |
|
1 |
+# TextMate |
|
2 |
+alias et='mate . &' |
|
3 |
+alias ett='mate app config lib db public spec test Rakefile Capfile Todo &' |
|
4 |
+alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' |
|
5 |
+alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo &' |
|
6 |
+ |
|
7 |
+# Editor Ruby file in TextMate |
|
8 |
+alias mr='mate CHANGELOG app config db lib public script spec test' |
|
9 |
+ |
|
10 |
+function tm() { |
|
11 |
+ cd $1 |
|
12 |
+ mate $1 |
|
13 |
+} |
0 | 14 |
deleted file mode 100644 |
... | ... |
@@ -1,22 +0,0 @@ |
1 |
-function zle-line-init zle-keymap-select { |
|
2 |
- zle reset-prompt |
|
3 |
-} |
|
4 |
- |
|
5 |
-zle -N zle-line-init |
|
6 |
-zle -N zle-keymap-select |
|
7 |
- |
|
8 |
-bindkey -v |
|
9 |
- |
|
10 |
-# if mode indicator wasn't setup by theme, define default |
|
11 |
-if [[ "$MODE_INDICATOR" == "" ]]; then |
|
12 |
- MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}" |
|
13 |
-fi |
|
14 |
- |
|
15 |
-function vi_mode_prompt_info() { |
|
16 |
- echo "${${KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/}" |
|
17 |
-} |
|
18 |
- |
|
19 |
-# define right prompt, if it wasn't defined by a theme |
|
20 |
-if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then |
|
21 |
- RPS1='$(vi_mode_prompt_info)' |
|
22 |
-fi |
23 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,22 @@ |
0 |
+function zle-line-init zle-keymap-select { |
|
1 |
+ zle reset-prompt |
|
2 |
+} |
|
3 |
+ |
|
4 |
+zle -N zle-line-init |
|
5 |
+zle -N zle-keymap-select |
|
6 |
+ |
|
7 |
+bindkey -v |
|
8 |
+ |
|
9 |
+# if mode indicator wasn't setup by theme, define default |
|
10 |
+if [[ "$MODE_INDICATOR" == "" ]]; then |
|
11 |
+ MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}" |
|
12 |
+fi |
|
13 |
+ |
|
14 |
+function vi_mode_prompt_info() { |
|
15 |
+ echo "${${KEYMAP/vicmd/$MODE_INDICATOR}/(main|viins)/}" |
|
16 |
+} |
|
17 |
+ |
|
18 |
+# define right prompt, if it wasn't defined by a theme |
|
19 |
+if [[ "$RPS1" == "" && "$RPROMPT" == "" ]]; then |
|
20 |
+ RPS1='$(vi_mode_prompt_info)' |
|
21 |
+fi |