Skip to content

Instantly share code, notes, and snippets.

autoload -Uz compinit && compinit
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
GIT_PS1_SHOWCOLORHINTS=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM=1
GIT_PS1_SHOWDIRTYSTATE=1
source ~/.git-prompt.sh
precmd () { __git_ps1 "%~ $" "%s " }
@haskelash
haskelash / Queue.swift
Created February 23, 2021 10:51
A Swift queue with a recursive enum
//
// Queue.swift
// Queue
//
// Created by Haskel Ash on 2/23/21.
//
import Foundation
fileprivate enum QueueNode<Element> {
alias.co checkout
alias.br branch
alias.ci commit
alias.st status
alias.di diff
alias.ca diff --cached
alias.gr log --graph --pretty=format:"%Cred%d %Cblue%h %Cgreen%an %Cred%cr %Creset%<(100,trunc)%s"
alias.wip ! git add -A; git ls-files --deleted -z | xargs -0 git rm; git commit -m "wip"
alias.rb reset HEAD~1
alias.rh ! git ls-files --others --exclude-standard -z | xargs -0 rm; git rev-parse --abbrev-ref @{u} | xargs echo -n | xargs -0 git reset --hard
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
@haskelash
haskelash / .bash_profile
Last active July 29, 2019 09:49
Bash Setup
source ~/.git-completion.bash
source ~/.profile
GIT_PS1_SHOWCOLORHINTS=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM=1
GIT_PS1_SHOWDIRTYSTATE=1
OCHRE="\033[38;5;95m"
RESET="\033[0m"