mirror of https://github.com/kianby/dotfiles
smart alias
parent
64c8509dac
commit
04356602bd
@ -1,28 +0,0 @@
|
||||
# fstash - easier way to deal with stashes
|
||||
# type fstash to get a list of your stashes
|
||||
# enter shows you the contents of the stash
|
||||
# ctrl-d shows a diff of the stash against your current HEAD
|
||||
# ctrl-b checks the stash out as a branch, for easier merging
|
||||
fstash() {
|
||||
local out q k sha
|
||||
while out=$(
|
||||
git stash list --pretty="%C(yellow)%h %>(14)%Cgreen%cr %C(blue)%gs" |
|
||||
fzf --ansi --no-sort --query="$q" --print-query \
|
||||
--expect=ctrl-d,ctrl-b);
|
||||
do
|
||||
mapfile -t out <<< "$out"
|
||||
q="${out[0]}"
|
||||
k="${out[1]}"
|
||||
sha="${out[-1]}"
|
||||
sha="${sha%% *}"
|
||||
[[ -z "$sha" ]] && continue
|
||||
if [[ "$k" == 'ctrl-d' ]]; then
|
||||
git diff $sha
|
||||
elif [[ "$k" == 'ctrl-b' ]]; then
|
||||
git stash branch "stash-$sha" $sha
|
||||
break;
|
||||
else
|
||||
git stash show -p $sha
|
||||
fi
|
||||
done
|
||||
}
|
@ -1,18 +1,14 @@
|
||||
|
||||
# alias and set var
|
||||
alias cdd='cd {{ .deploydir }}'
|
||||
export cdd={{ .deploydir }}
|
||||
|
||||
# maven
|
||||
if [ -f "{{ .java_truststore_file }}" ]; then
|
||||
if hash mvn 2>/dev/null; then
|
||||
if [ -f "{{ .java_truststore_file }}" ]; then
|
||||
alias m='mvn -Djavax.net.ssl.trustStore={{ .java_truststore_file }} -Djavax.net.ssl.trustStorePassword={{ .java_truststore_password }}'
|
||||
else
|
||||
else
|
||||
alias m='mvn'
|
||||
fi
|
||||
alias mvnp='m -Dmaven.test.skip -Dmaven.javadoc.skip=true -DskipMunitTests clean package'
|
||||
alias mvnd='m -Dmaven.test.skip -Dmaven.javadoc.skip=true deploy -P profile-nexus'
|
||||
alias mvni='m -Dmaven.test.skip -Dmaven.javadoc.skip=true clean install'
|
||||
|
||||
# copy maven artifact
|
||||
alias d='python3 ~/.local/bin/deploy.py'
|
||||
fi
|
||||
alias mvnp='m -Dmaven.test.skip -Dmaven.javadoc.skip=true -DskipMunitTests clean package'
|
||||
alias mvnd='m -Dmaven.test.skip -Dmaven.javadoc.skip=true deploy -P profile-nexus'
|
||||
alias mvni='m -Dmaven.test.skip -Dmaven.javadoc.skip=true clean install'
|
||||
|
||||
# copy maven artifact
|
||||
alias d='python3 ~/.local/bin/deploy.py'
|
||||
fi
|
||||
|
Loading…
Reference in New Issue