Skip to content

Instantly share code, notes, and snippets.

@jiMuBao
jiMuBao / git-zsh-checkout-autocomplete-local-only.md
Created October 18, 2017 02:44 — forked from mmrko/git-zsh-checkout-autocomplete-local-only.md
List only local branches when autocompleting git checkout (Zsh)
git config --global alias.checkoutr checkout
$EDITOR /usr/local/share/zsh/site-functions/git-completion.bash

...and then modify the file as follows...

-__gitcomp_nl "$(__git_refs '' $track)"
+if [ "$command" = "checkoutr" ]; then
+    __gitcomp_nl "$(__git_refs '' $track)"
+else
@jiMuBao
jiMuBao / index.html
Last active August 29, 2015 14:08 — forked from jonnyreeves/index.html
javascript: Require JS construct object
<!DOCTYPE html>
<html>
<head>
<script data-main="usage" src="http://requirejs.org/docs/release/1.0.8/comments/require.js"></script>
</head>
<body>
<p>Check your JavaScript console for output!</p>
</body>
</head>
@jiMuBao
jiMuBao / tmux.conf
Created November 28, 2013 22:38 — forked from spicycode/tmux.conf
tmux: configuration
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000