alias -- -7="cd -7"
alias -- -8="cd -8"
alias -- -9="cd -9"
-# alias ++ pushd
-# alias -- popd
# Secure settings
alias rm='rm -i'
alias fgrep='fgrep --color=auto' # show differences in color
# Shortcuts
-alias d="cd ~/Documents"
-alias dl="cd ~/Downloads"
-alias dt="cd ~/Desktop"
-alias w="cd ~/work"
-alias g="git"
alias h="history"
alias j="jobs"
+alias gg="global -grx"
LS_COMMON="-hF"
# Reload the shell (i.e. invoke as a login shell)
alias reload="exec $SHELL -l"
-# Update dotfiles
-alias pull.='pushd ~/.dotfiles && git pull && stow -vR * && popd'
-alias push.='pushd ~/.dotfiles && git commit -a && git push && popd'
-
# alias bashhere='chere -il -t mintty -s bash'
alias newterm='mintty /bin/env CHERE_INVOKING=1 /bin/bash -l &'
alias gtypist='gtypist -wi'
--- /dev/null
+#!/bin/sh
+set -e
+PATH="/usr/local/bin:$PATH"
+dir="`git rev-parse --git-dir`"
+trap 'rm -f "$dir/$$.cscope.out"' EXIT INT TERM
+git ls-files |\
+ grep -E '\.(c(pp)?|h)$' |\
+ awk '{print "\""$0"\""}' |\
+ cscope -R -b -i - -f "$dir/$$.cscope.out"
+mv "$dir/$$.cscope.out" "$dir/../cscope.out"
--- /dev/null
+#! /bin/sh
+set -e
+PATH="/usr/local/bin:$PATH"
+dir="`git rev-parse --git-dir`"
+trap 'rm -rf "$dir/$$.gtags" EXIT INT TERM
+mkdir "$dir/$$.gtags"
+git ls-files | \
+ gtags --file=- --skip-unreadable "$dir/$$.gtags"
+mv "$dir/$$.gtags/*" "$dir/.."
root = rev-parse --show-toplevel
ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"
gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags"
+ cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope"
+
[include]
# Local/private config goes in the include
path = ~/.gitconfig_local