Skip to content

Commit 44623ff

Browse files
authored
Merge pull request #2265 from seefood/ira/pre-commit-cleanup
2 parents 0cfc448 + 3e36562 commit 44623ff

File tree

113 files changed

+4526
-4678
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+4526
-4678
lines changed

clean_files.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ themes/brainy
160160
themes/brunton
161161
themes/candy
162162
themes/clean
163+
themes/doubletime
163164
themes/easy
164165
themes/elixr
165166
themes/essential
@@ -175,7 +176,7 @@ themes/pete
175176
themes/powerline
176177
themes/pure
177178
themes/purity
178-
179+
themes/rjorgenson
179180

180181
# vendor init files
181182
#

completion/available/fabric.completion.bash

Lines changed: 67 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -31,103 +31,99 @@
3131
# https://github.com/ricobl/dotfiles/blob/master/bin/fab_bash_completion
3232
#
3333

34-
3534
# Use cache files for fab tasks or not.
3635
# If set to "false" command "fab --shortlist" will be executed every time.
3736
export FAB_COMPLETION_CACHE_TASKS=true
3837

3938
# File name where tasks cache will be stored (in current dir).
4039
export FAB_COMPLETION_CACHED_TASKS_FILENAME=".fab_tasks~"
4140

42-
4341
# Set command to get time of last file modification as seconds since Epoch
4442
case "$OSTYPE" in
45-
'darwin'*|'freebsd'*)
46-
__FAB_COMPLETION_MTIME_COMMAND="stat -f '%m'"
47-
;;
48-
*)
49-
__FAB_COMPLETION_MTIME_COMMAND="stat -c '%Y'"
50-
;;
43+
'darwin'* | 'freebsd'*)
44+
__FAB_COMPLETION_MTIME_COMMAND="stat -f '%m'"
45+
;;
46+
*)
47+
__FAB_COMPLETION_MTIME_COMMAND="stat -c '%Y'"
48+
;;
5149
esac
5250

53-
5451
#
5552
# Get time of last fab cache file modification as seconds since Epoch
5653
#
5754
function __fab_chache_mtime() {
58-
${__FAB_COMPLETION_MTIME_COMMAND} \
59-
$FAB_COMPLETION_CACHED_TASKS_FILENAME | xargs -n 1 expr
55+
${__FAB_COMPLETION_MTIME_COMMAND} \
56+
$FAB_COMPLETION_CACHED_TASKS_FILENAME | xargs -n 1 expr
6057
}
6158

62-
6359
#
6460
# Get time of last fabfile file/module modification as seconds since Epoch
6561
#
6662
function __fab_fabfile_mtime() {
67-
local f="fabfile"
68-
if [[ -e "$f.py" ]]; then
69-
${__FAB_COMPLETION_MTIME_COMMAND} "$f.py" | xargs -n 1 expr
70-
else
71-
# Suppose that it's a fabfile dir
72-
find $f/*.py -exec ${__FAB_COMPLETION_MTIME_COMMAND} {} + \
73-
| xargs -n 1 expr | sort -n -r | head -1
74-
fi
63+
local f="fabfile"
64+
if [[ -e "$f.py" ]]; then
65+
${__FAB_COMPLETION_MTIME_COMMAND} "$f.py" | xargs -n 1 expr
66+
else
67+
# Suppose that it's a fabfile dir
68+
find $f/*.py -exec ${__FAB_COMPLETION_MTIME_COMMAND} {} + \
69+
| xargs -n 1 expr | sort -n -r | head -1
70+
fi
7571
}
7672

77-
7873
#
7974
# Completion for "fab" command
8075
#
8176
function __fab_completion() {
82-
# Return if "fab" command doesn't exists
83-
[[ -e `which fab 2> /dev/null` ]] || return 0
84-
85-
# Variables to hold the current word and possible matches
86-
local cur="${COMP_WORDS[COMP_CWORD]}"
87-
local opts=()
88-
89-
# Generate possible matches and store them in variable "opts"
90-
case "${cur}" in
91-
-*)
92-
if [[ -z "${__FAB_COMPLETION_LONG_OPT}" ]]; then
93-
export __FAB_COMPLETION_LONG_OPT=$(
94-
fab --help | grep -E -o "\-\-[A-Za-z_\-]+\=?" | sort -u)
95-
fi
96-
opts="${__FAB_COMPLETION_LONG_OPT}"
97-
;;
98-
99-
# Completion for short options is not nessary.
100-
# It's left here just for history.
101-
# -*)
102-
# if [[ -z "${__FAB_COMPLETION_SHORT_OPT}" ]]; then
103-
# export __FAB_COMPLETION_SHORT_OPT=$(
104-
# fab --help | grep -E -o "^ +\-[A-Za-z_\]" | sort -u)
105-
# fi
106-
# opts="${__FAB_COMPLETION_SHORT_OPT}"
107-
# ;;
108-
109-
*)
110-
# If "fabfile.py" or "fabfile" dir with "__init__.py" file exists
111-
local f="fabfile"
112-
if [[ -e "$f.py" || (-d "$f" && -e "$f/__init__.py") ]]; then
113-
# Build a list of the available tasks
114-
if $FAB_COMPLETION_CACHE_TASKS; then
115-
# If use cache
116-
if [[ ! -s ${FAB_COMPLETION_CACHED_TASKS_FILENAME} ||
117-
$(__fab_fabfile_mtime) -gt $(__fab_chache_mtime) ]]; then
118-
fab --shortlist > ${FAB_COMPLETION_CACHED_TASKS_FILENAME} \
119-
2> /dev/null
120-
fi
121-
opts=$(cat ${FAB_COMPLETION_CACHED_TASKS_FILENAME})
122-
else
123-
# Without cache
124-
opts=$(fab --shortlist 2> /dev/null)
125-
fi
126-
fi
127-
;;
128-
esac
129-
130-
# Set possible completions
131-
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
77+
# Return if "fab" command doesn't exists
78+
[[ -e $(which fab 2> /dev/null) ]] || return 0
79+
80+
# Variables to hold the current word and possible matches
81+
local cur="${COMP_WORDS[COMP_CWORD]}"
82+
local opts=()
83+
84+
# Generate possible matches and store them in variable "opts"
85+
case "${cur}" in
86+
-*)
87+
if [[ -z "${__FAB_COMPLETION_LONG_OPT}" ]]; then
88+
export __FAB_COMPLETION_LONG_OPT=$(
89+
fab --help | grep -E -o "\-\-[A-Za-z_\-]+\=?" | sort -u
90+
)
91+
fi
92+
opts="${__FAB_COMPLETION_LONG_OPT}"
93+
;;
94+
95+
# Completion for short options is not nessary.
96+
# It's left here just for history.
97+
# -*)
98+
# if [[ -z "${__FAB_COMPLETION_SHORT_OPT}" ]]; then
99+
# export __FAB_COMPLETION_SHORT_OPT=$(
100+
# fab --help | grep -E -o "^ +\-[A-Za-z_\]" | sort -u)
101+
# fi
102+
# opts="${__FAB_COMPLETION_SHORT_OPT}"
103+
# ;;
104+
105+
*)
106+
# If "fabfile.py" or "fabfile" dir with "__init__.py" file exists
107+
local f="fabfile"
108+
if [[ -e "$f.py" || (-d "$f" && -e "$f/__init__.py") ]]; then
109+
# Build a list of the available tasks
110+
if $FAB_COMPLETION_CACHE_TASKS; then
111+
# If use cache
112+
if [[ ! -s ${FAB_COMPLETION_CACHED_TASKS_FILENAME} ||
113+
$(__fab_fabfile_mtime) -gt $(__fab_chache_mtime) ]]; then
114+
fab --shortlist > ${FAB_COMPLETION_CACHED_TASKS_FILENAME} \
115+
2> /dev/null
116+
fi
117+
opts=$(cat ${FAB_COMPLETION_CACHED_TASKS_FILENAME})
118+
else
119+
# Without cache
120+
opts=$(fab --shortlist 2> /dev/null)
121+
fi
122+
fi
123+
;;
124+
esac
125+
126+
# Set possible completions
127+
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
132128
}
133129
complete -o default -o nospace -F __fab_completion fab

completion/available/git_flow.completion.bash

Lines changed: 58 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
#
4646
# Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/)
4747

48-
_git_flow ()
49-
{
48+
_git_flow() {
5049
local subcommands="init feature release hotfix"
5150
local subcommand="$(__git_find_subcommand "$subcommands")"
5251
if [ -z "$subcommand" ]; then
@@ -55,26 +54,25 @@ _git_flow ()
5554
fi
5655

5756
case "$subcommand" in
58-
feature)
59-
__git_flow_feature
60-
return
61-
;;
62-
release)
63-
__git_flow_release
64-
return
65-
;;
66-
hotfix)
67-
__git_flow_hotfix
68-
return
69-
;;
70-
*)
71-
COMPREPLY=()
72-
;;
57+
feature)
58+
__git_flow_feature
59+
return
60+
;;
61+
release)
62+
__git_flow_release
63+
return
64+
;;
65+
hotfix)
66+
__git_flow_hotfix
67+
return
68+
;;
69+
*)
70+
COMPREPLY=()
71+
;;
7372
esac
7473
}
7574

76-
__git_flow_feature ()
77-
{
75+
__git_flow_feature() {
7876
local subcommands="list start finish publish track diff rebase checkout pull"
7977
local subcommand="$(__git_find_subcommand "$subcommands")"
8078
if [ -z "$subcommand" ]; then
@@ -83,45 +81,41 @@ __git_flow_feature ()
8381
fi
8482

8583
case "$subcommand" in
86-
pull)
87-
__gitcomp "$(__git_remotes)"
88-
return
89-
;;
90-
checkout|finish|diff|rebase)
91-
__gitcomp "$(__git_flow_list_features)"
92-
return
93-
;;
94-
publish)
95-
__gitcomp "$(comm -23 <(__git_flow_list_features) <(__git_flow_list_remote_features))"
96-
return
97-
;;
98-
track)
99-
__gitcomp "$(__git_flow_list_remote_features)"
100-
return
101-
;;
102-
*)
103-
COMPREPLY=()
104-
;;
84+
pull)
85+
__gitcomp "$(__git_remotes)"
86+
return
87+
;;
88+
checkout | finish | diff | rebase)
89+
__gitcomp "$(__git_flow_list_features)"
90+
return
91+
;;
92+
publish)
93+
__gitcomp "$(comm -23 <(__git_flow_list_features) <(__git_flow_list_remote_features))"
94+
return
95+
;;
96+
track)
97+
__gitcomp "$(__git_flow_list_remote_features)"
98+
return
99+
;;
100+
*)
101+
COMPREPLY=()
102+
;;
105103
esac
106104
}
107105

108-
__git_flow_list_features ()
109-
{
106+
__git_flow_list_features() {
110107
git flow feature list 2> /dev/null | tr -d ' |*'
111108
}
112109

113-
__git_flow_list_remote_features ()
114-
{
110+
__git_flow_list_remote_features() {
115111
git branch -r 2> /dev/null | grep "origin/$(__git_flow_feature_prefix)" | awk '{ sub(/^origin\/$(__git_flow_feature_prefix)/, "", $1); print }'
116112
}
117113

118-
__git_flow_feature_prefix ()
119-
{
114+
__git_flow_feature_prefix() {
120115
git config gitflow.prefix.feature 2> /dev/null || echo "feature/"
121116
}
122117

123-
__git_flow_release ()
124-
{
118+
__git_flow_release() {
125119
local subcommands="list start finish"
126120
local subcommand="$(__git_find_subcommand "$subcommands")"
127121
if [ -z "$subcommand" ]; then
@@ -130,24 +124,22 @@ __git_flow_release ()
130124
fi
131125

132126
case "$subcommand" in
133-
finish)
134-
__gitcomp "$(__git_flow_list_releases)"
135-
return
136-
;;
137-
*)
138-
COMPREPLY=()
139-
;;
127+
finish)
128+
__gitcomp "$(__git_flow_list_releases)"
129+
return
130+
;;
131+
*)
132+
COMPREPLY=()
133+
;;
140134
esac
141135

142136
}
143137

144-
__git_flow_list_releases ()
145-
{
138+
__git_flow_list_releases() {
146139
git flow release list 2> /dev/null
147140
}
148141

149-
__git_flow_hotfix ()
150-
{
142+
__git_flow_hotfix() {
151143
local subcommands="list start finish"
152144
local subcommand="$(__git_find_subcommand "$subcommands")"
153145
if [ -z "$subcommand" ]; then
@@ -156,23 +148,21 @@ __git_flow_hotfix ()
156148
fi
157149

158150
case "$subcommand" in
159-
finish)
160-
__gitcomp "$(__git_flow_list_hotfixes)"
161-
return
162-
;;
163-
*)
164-
COMPREPLY=()
165-
;;
151+
finish)
152+
__gitcomp "$(__git_flow_list_hotfixes)"
153+
return
154+
;;
155+
*)
156+
COMPREPLY=()
157+
;;
166158
esac
167159
}
168160

169-
__git_flow_list_hotfixes ()
170-
{
161+
__git_flow_list_hotfixes() {
171162
git flow hotfix list 2> /dev/null
172163
}
173164

174165
# temporarily wrap __git_find_on_cmdline() for backwards compatibility
175-
if ! _command_exists __git_find_subcommand
176-
then
166+
if ! _command_exists __git_find_subcommand; then
177167
alias __git_find_subcommand=__git_find_on_cmdline
178168
fi

0 commit comments

Comments
 (0)