Browse code
feat(zsh): make GIT_DIR automagically, add vmd, don't trunk gtaliases
Showing 4 changed files
- zsh/zsh_plugins/01-git.zsh
- zsh/zsh_plugins/02-pandoc.zsh
- zsh/zsh_plugins/99-completion.zsh
- zsh/zsh_plugins/dependencies/named-directories.zsh
... | ... |
@@ -5,6 +5,11 @@ GIT_DEBUG=0 |
5 | 5 |
GIT_CMD="`which -p git 2>/dev/null`" |
6 | 6 |
GTI_CMD="`which -p gti 2>/dev/null`" |
7 | 7 |
|
8 |
+GIT_DIR=("$HOME"/git*repos) |
|
9 |
+if ! [[ -d "$HOME/git*_repos" ]]; then |
|
10 |
+ mkdir -p "$HOME"/git_repos |
|
11 |
+fi |
|
12 |
+ |
|
8 | 13 |
git-bump() { |
9 | 14 |
git commit -m "${SITE_PREFIX:-}(bump)" --allow-empty |
10 | 15 |
} |
... | ... |
@@ -137,7 +142,7 @@ git-remote() { |
137 | 142 |
base_cmd=("$GIT_CMD" remote) |
138 | 143 |
opts=() |
139 | 144 |
args=() |
140 |
- for x in "$@"; do |
|
145 |
+ for x in "$@"; do |
|
141 | 146 |
if [[ "${x[1]}" == "-" ]]; then |
142 | 147 |
opts=("${opts[@]}" "$x") |
143 | 148 |
else |
... | ... |
@@ -149,9 +154,9 @@ git-remote() { |
149 | 154 |
b=${args[2]}; |
150 | 155 |
shift 2 args; |
151 | 156 |
args=("$a" "${args[@]}") |
152 |
- if (( $#opts > 0 )); then |
|
157 |
+ if (( $#opts > 0 )); then |
|
153 | 158 |
"${base_cmd[@]}" "$b" "${opts[@]}" "${args[@]}" |
154 |
- else |
|
159 |
+ else |
|
155 | 160 |
"${base_cmd[@]}" "$b" "${args[@]}" |
156 | 161 |
fi |
157 | 162 |
} else { |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
# Requires pandoc |
2 | 2 |
|
3 | 3 |
2man() { |
4 |
- input="$2" |
|
4 |
+ local input="$2" |
|
5 | 5 |
if [[ "$input" == "" ]]; then |
6 | 6 |
input="-" |
7 | 7 |
fi |
... | ... |
@@ -11,6 +11,9 @@ |
11 | 11 |
alias html2man='2man html' |
12 | 12 |
alias md2man='2man markdown' |
13 | 13 |
alias latex2man='2man latex' |
14 |
+vmd() { |
|
15 |
+ md2man $1 | man- | less |
|
16 |
+} |
|
14 | 17 |
|
15 | 18 |
_pandoc_view() { |
16 | 19 |
2man $1 $2 | man- |
... | ... |
@@ -39,7 +39,7 @@ zstyle :compinstall filename '/Users/elangley/.zsh.d/99-completion.zsh' |
39 | 39 |
|
40 | 40 |
|
41 | 41 |
source $HOME/.zsh.d/nix-zsh-completions/nix.plugin.zsh |
42 |
-fpath=($HOME/.zsh.d/completion $fpath $HOME/.zsh.d/nix-zsh-completions) |
|
42 |
+fpath=($HOME/.zsh.d/completion $fpath $HOME/.zsh.d/zsh-completions/src $HOME/.zsh.d/nix-zsh-completions) |
|
43 | 43 |
|
44 | 44 |
autoload -Uz compinit |
45 | 45 |
|