Compare commits

...

3 Commits

Author SHA1 Message Date
bretello 2fb53e6f2b
zsh: functions: cleanup git functions, add git-show-changes 2022-06-21 23:06:21 +02:00
bretello 5f4b4538bb
zsh: functions: mkvenv: replace venv with virtualenv
virtualenv is faster than venv and also installs wheel by default
2022-06-21 23:05:35 +02:00
bretello a3f74bf816
ansible: gitignore migration + install 2022-05-08 19:17:29 +02:00
4 changed files with 19 additions and 5 deletions

View File

@ -75,6 +75,7 @@
'pdbrc.py': '~/.pdbrc.py'
# "ipython": "~/.ipython" # FIXME: ipython config is more complex
'ansible/ansible.cfg': '~/.ansible.cfg'
'gitignore': '~/.git/config/ignore'
- name: check undodir_migration
stat: path=${HOME}/.vim_runtime/temp_dirs/undodir

View File

@ -15,3 +15,11 @@
- name: vim
ansible.builtin.shell: DOTFILES={{DOTFILES}} vim -c 'PlugUpdate|qa!'
- name: check gitignore migration
stat: path=${HOME}/.gitignore
register: gitignore
- name: gitignore migration
command: mkdir -p ${HOME}/.config/git && ln -s ${DOTFILES}/gitignore ${HOME}/.config/git/ignore && rm -f ~/.gitignore
when: gitignore.stat.exists

View File

@ -39,11 +39,11 @@ compdef "__git_completion_wrapper __git_recent_branches" git-switch-recent-branc
# Runs git log with fzf with preview
function fgitlog() {
git log --oneline $@ | fzf --multi --preview 'git -p show --color=always {+1}' --preview-window=right,60%
git showtool $(git log --oneline $@ | fzf --multi --preview 'git -p show --color=always {+1}' --preview-window=right,60% | awk '{print $1}')
}
compdef _git fgitlog=git-log
git-commit-show() {
function git-commit-show() {
git log --graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" $@ |
fzf --ansi --no-sort --reverse --tiebreak=index --preview \
'f() {
@ -59,13 +59,18 @@ git-commit-show() {
}
compdef "__git_completion_wrapper __git_recent_commits" git-commit-show
git-fixup() {
function git-fixup() {
git commit --fixup=$1
git -c sequence.editor=true rebase --interactive --autosquash $1^
}
compdef "__git_completion_wrapper __git_recent_commits" git-fixup
git-diff-branch() {
function git-diff-branch() {
git diff $@
}
compdef "__git_completion_wrapper __git_branch_names" git-diff-branch
function git-show-changes(){
git log --reverse HEAD^..
}

View File

@ -10,7 +10,7 @@ mkvenv(){
return 1
fi
echo -n "Creating venv..." && python -m venv $@ .venv
echo -n "Creating venv..." && python -m virtualenv $@ .venv || echo -e "Failed to create virtualenv. Is virtualenv installed? Try:\n $ pip install virtualenv"
if [[ -z ${source_venv} ]]; then
echo -n " done. Enable? [Y/n]"
read source_venv