-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshenv
84 lines (69 loc) · 1.92 KB
/
zshenv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
function _current_elixir() {
local _elixir
_elixir="$(asdf current elixir | grep -o '[0-9]*\.[0-9]*\.[0-9]*')"
echo -n elixir-v${_elixir}
}
function _current_node() {
local _node
_node="$(asdf current nodejs | grep -o '[0-9]*\.[0-9]*\.[0-9]*')"
echo -n node-v${_node}
}
function _current_python() {
local _python
_python="$(asdf current python | grep -o '[0-9]*\.[0-9]*\.[0-9]*')"
echo -n python-v${_python}
}
function _current_ruby() {
local _ruby
_ruby="$(asdf current ruby | grep -o '[0-9]*\.[0-9]*\.[0-9]*')"
echo -n ruby-v${_ruby}
}
function my_current_elixir() {
prompt_segment 098 white '$(_current_elixir)'
}
function my_current_node() {
prompt_segment green white '$(_current_node)'
}
function my_current_python() {
prompt_segment 025 white '$(_current_python)'
}
function my_current_ruby() {
prompt_segment red white '$(_current_ruby)'
}
function build_right_prompt() {
prompt_segment
# my_current_ruby
# my_current_node
my_current_elixir
my_current_python
prompt_end
}
function dclean() {
docker rm -v $(docker ps -a -q -f status=exited) 2> /dev/null
docker rmi $(docker images -f "dangling=true" -q) 2> /dev/null
}
_tmuxinator() {
local commands projects
commands=(${(f)"$(tmuxinator commands zsh)"})
projects=(${(f)"$(tmuxinator completions start)"})
if (( CURRENT == 2 )); then
_describe -t commands "tmuxinator subcommands" commands
_describe -t projects "tmuxinator projects" projects
elif (( CURRENT == 3)); then
case $words[2] in
copy|debug|delete|open|start)
_arguments '*:projects:($projects)'
;;
esac
fi
return
}
function end_feature() {
git checkout master ; git pull origin master ; git branch -d $1 ; git remote prune origin
}
function end_feature2() {
git checkout main ; git pull origin main ; git branch -d $1 ; git remote prune origin
}
function super_commit() {
git add . ; git commit -S -v ; git push origin $1
}