*.txt text
# Text files with fixed EOL=LF
-*.sh text eol=LF
+*.sh text eol=lf
# Text files with fixed EOL=CRLF$
-*.bat text eol=CRLF
+*.bat text eol=crlf
*.ahk text eol=crlf
*.vcproj text eol=crlf
-[user]\r
- name = Jannik ZANDER\r
+[user]
+ name = Jannik ZANDER
email = jzander@grundfos.com
-[core]\r
- editor = vim\r
- pager = less\r
+[core]
+ editor = vim
+ pager = less
quotepath = false
commitGraph = true
-[help]\r
- autocorrect = 10\r
-[branch]\r
- autosetupmerge = always\r
- autosetuprebase = always\r
-[rebase]\r
- autosquash = true\r
- autostash = true\r
-[pull]\r
- rebase = true\r
-[push]\r
- default = simple\r
+[help]
+ autocorrect = 10
+[branch]
+ autosetupmerge = always
+ autosetuprebase = always
+[rebase]
+ autosquash = true
+ autostash = true
+[pull]
+ rebase = true
+[push]
+ default = simple
recurseSubmodules = check
-[diff]\r
- tool = bc\r
+[diff]
+ tool = bc
submodule = log
-[merge]\r
- tool = bc\r
-[difftool "vimdiff"]\r
- prompt = false\r
- conflictstyle = diff3\r
-[mergetool "vimdiff"]\r
- prompt = false\r
-[difftool "bc"]\r
+[merge]
+ tool = bc
+[difftool "vimdiff"]
+ prompt = false
+ conflictstyle = diff3
+[mergetool "vimdiff"]
+ prompt = false
+[difftool "bc"]
path = c:/Program Files/Beyond Compare 4/bcomp.exe
trustExitCode = false
[mergetool "bc"]
path = c:/Program Files/Beyond Compare 4/bcomp.exe
- trustExitCode = false\r
-[init]\r
- templatedir = ~/.config/git/templates\r
-[filter "lfs"]\r
- clean = git-lfs clean %f\r
- smudge = git-lfs smudge %f\r
- required = true\r
-[alias]\r
-# shortcuts\r
- pp = "!git pull --rebase && git push"\r
- up = "!git pull --rebase --prune $@ && git submodule update --init --recursive"\r
- co = checkout\r
- ci = commit\r
- st = status\r
- ls = ls-files\r
- cl = clone --recurse-submodules -j8\r
+ trustExitCode = false
+[init]
+ templatedir = ~/.config/git/templates
+[filter "lfs"]
+ clean = git-lfs clean %f
+ smudge = git-lfs smudge %f
+ required = true
+[alias]
+# shortcuts
+ pp = "!git pull --rebase && git push"
+ up = "!git pull --rebase --prune $@ && git submodule update --init --recursive"
+ co = checkout
+ ci = commit
+ st = status
+ ls = ls-files
+ cl = clone --recurse-submodules -j8
dt = cloner = clone --recursive
- dt = difftool\r
- mt = mergetool\r
- undo = reset --soft HEAD^ \r
- unci = reset --soft HEAD~\r
- una = reset HEAD --\r
- uha = checkout HEAD --\r
- unaa = reset HEAD\r
- uhaa = reset --hard HEAD\r
- sb = status -sb\r
- amend = commit --amend\r
- a = add\r
- br = branch\r
- brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"\r
- go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"\r
- diff = diff --word-diff\r
- # dont pull without rebase, and dont push without pull (fetch & merge)\r
- # avoid merge commits\r
- mf = merge --ff-only\r
- cp = cherry-pick\r
- wc = whatchanged -p\r
- ch = cherry -v\r
- fs = "!git fetch && git status"\r
- rb = rebase\r
- ec = config --global -e\r
- l = log --oneline --decorate\r
- lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph\r
- lol = log --oneline --decorate --graph --all --first-parent\r
- last = log -1 HEAD\r
- lt = tag -l\r
- type = cat-file -t\r
- dump = cat-file -p\r
- who = shortlog -s --\r
- remotes = remote -v\r
- root = rev-parse --show-toplevel\r
-\r
- # Show the diff between the latest commit and the current state\r
- d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"\r
- # `git di $number` shows the diff between the state `$number` revisions ago and the current state\r
- di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"\r
-\r
- # Find branches containing commit\r
- fb = "!f() { git branch -a --contains $1; }; f"\r
- # Find tags containing commit\r
- ft = "!f() { git describe --always --contains $1; }; f"\r
- # Find commits by source code\r
- fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"\r
- # Find commits by commit message\r
- fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"\r
-\r
- #Credit an author on the latest commit\r
- credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"\r
- # List contributors with number of commits\r
- contributors = shortlog --summary --numbered\r
-\r
- ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"\r
- gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags"\r
- cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope"\r
-\r
+ dt = difftool
+ mt = mergetool
+ undo = reset --soft HEAD^
+ unci = reset --soft HEAD~
+ una = reset HEAD --
+ uha = checkout HEAD --
+ unaa = reset HEAD
+ uhaa = reset --hard HEAD
+ sb = status -sb
+ amend = commit --amend
+ a = add
+ br = branch
+ brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
+ go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
+ diff = diff --word-diff
+ # dont pull without rebase, and dont push without pull (fetch & merge)
+ # avoid merge commits
+ mf = merge --ff-only
+ cp = cherry-pick
+ wc = whatchanged -p
+ ch = cherry -v
+ fs = "!git fetch && git status"
+ rb = rebase
+ ec = config --global -e
+ l = log --oneline --decorate
+ lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
+ lol = log --oneline --decorate --graph --all --first-parent
+ last = log -1 HEAD
+ lt = tag -l
+ type = cat-file -t
+ dump = cat-file -p
+ who = shortlog -s --
+ remotes = remote -v
+ root = rev-parse --show-toplevel
+
+ # Show the diff between the latest commit and the current state
+ d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
+ # `git di $number` shows the diff between the state `$number` revisions ago and the current state
+ di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
+
+ # Find branches containing commit
+ fb = "!f() { git branch -a --contains $1; }; f"
+ # Find tags containing commit
+ ft = "!f() { git describe --always --contains $1; }; f"
+ # Find commits by source code
+ fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
+ # Find commits by commit message
+ fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
+
+ #Credit an author on the latest commit
+ credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
+ # List contributors with number of commits
+ contributors = shortlog --summary --numbered
+
+ 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"
+
sdiff = !git diff && git submodule foreach 'git diff'
-[include]\r
- path = ~/.gitconfig.local\r
+[include]
+ path = ~/.gitconfig.local
[gc]
writeCommitGraph = true
[status]
-# Ignore tags created by etags, ctags, gtags (GNU global) and cscope\r
-TAGS\r
-.TAGS\r
-!TAGS/\r
-tags\r
-.tags\r
-!tags/\r
-gtags.files\r
-GTAGS\r
-GRTAGS\r
-GPATH\r
-cscope.files\r
-cscope.out\r
-cscope.in.out\r
-cscope.po.out\r
-\r
-# Windows image file caches\r
-Thumbs.db\r
-ehthumbs.db\r
-\r
-# Folder config file\r
-Desktop.ini\r
-\r
-# Recycle Bin used on file shares\r
-$RECYCLE.BIN/\r
-\r
-# Windows Installer files\r
-*.cab\r
-*.msi\r
-*.msm\r
-*.msp\r
-\r
-# Windows shortcuts\r
-*.lnk\r
-\r
-\r
-# OSX\r
-*.DS_Store\r
-.AppleDouble\r
-.LSOverride\r
-\r
-# Icon must end with two \r\r
-Icon\r
-\r
-# Thumbnails\r
-._*\r
-\r
-# Files that might appear in the root of a volume\r
-.DocumentRevisions-V100\r
-.fseventsd\r
-.Spotlight-V100\r
-.TemporaryItems\r
-.Trashes\r
-.VolumeIcon.icns\r
-.com.apple.timemachine.donotpresent\r
-\r
-# Directories potentially created on remote AFP share\r
-.AppleDB\r
-.AppleDesktop\r
-Network Trash Folder\r
-Temporary Items\r
-.apdisk\r
-\r
-__pycache__\r
+# Ignore tags created by etags, ctags, gtags (GNU global) and cscope
+TAGS
+.TAGS
+!TAGS/
+tags
+.tags
+!tags/
+gtags.files
+GTAGS
+GRTAGS
+GPATH
+cscope.files
+cscope.out
+cscope.in.out
+cscope.po.out
+
+# Windows image file caches
+Thumbs.db
+ehthumbs.db
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Windows Installer files
+*.cab
+*.msi
+*.msm
+*.msp
+
+# Windows shortcuts
+*.lnk
+
+
+# OSX
+*.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+__pycache__
-[core]\r
- repositoryformatversion = 0\r
- filemode = true\r
- bare = false\r
- logallrefupdates = true\r
-[branch "master"]\r
- remote = origin\r
- merge = refs/heads/master\r
- rebase = true\r
+[core]
+ repositoryformatversion = 0
+ filemode = true
+ bare = false
+ logallrefupdates = true
+[branch "master"]
+ remote = origin
+ merge = refs/heads/master
+ rebase = true
-# ===================================================================\r
-# == Options\r
-# ===================================================================\r
-\r
-# Show hidden files? You can toggle this by typing 'zh'\r
-set show_hidden true\r
-\r
-# Which script is used to generate file previews?\r
-# ranger ships with scope.sh, a script that calls external programs (see\r
-# README.md for dependencies) to preview images, archives, etc.\r
-set preview_script ~/.config/ranger/scope.sh\r
-\r
-# Use the external preview script or display simple plain text or image previews?\r
-set use_preview_script true\r
-\r
-# State of the three backends git, hg, bzr. The possible states are\r
-# disabled, local (only show local info), enabled (show local and remote\r
-# information).\r
-set vcs_backend_git enabled\r
-\r
-# Use one of the supported image preview protocols\r
-set preview_images true\r
-\r
+# ===================================================================
+# == Options
+# ===================================================================
+
+# Show hidden files? You can toggle this by typing 'zh'
+set show_hidden true
+
+# Which script is used to generate file previews?
+# ranger ships with scope.sh, a script that calls external programs (see
+# README.md for dependencies) to preview images, archives, etc.
+set preview_script ~/.config/ranger/scope.sh
+
+# Use the external preview script or display simple plain text or image previews?
+set use_preview_script true
+
+# State of the three backends git, hg, bzr. The possible states are
+# disabled, local (only show local info), enabled (show local and remote
+# information).
+set vcs_backend_git enabled
+
+# Use one of the supported image preview protocols
+set preview_images true
+
-#!/usr/bin/env sh\r
-# ranger supports enhanced previews. If the option "use_preview_script"\r
-# is set to True and this file exists, this script will be called and its\r
-# output is displayed in ranger. ANSI color codes are supported.\r
-\r
-# NOTES: This script is considered a configuration file. If you upgrade\r
-# ranger, it will be left untouched. (You must update it yourself.)\r
-# Also, ranger disables STDIN here, so interactive scripts won't work properly\r
-\r
-# Meanings of exit codes:\r
-# code | meaning | action of ranger\r
-# -----+------------+-------------------------------------------\r
-# 0 | success | success. display stdout as preview\r
-# 1 | no preview | failure. display no preview at all\r
-# 2 | plain text | display the plain content of the file\r
-# 3 | fix width | success. Don't reload when width changes\r
-# 4 | fix height | success. Don't reload when height changes\r
-# 5 | fix both | success. Don't ever reload\r
-# 6 | image | success. display the image $cached points to as an image preview\r
-# 7 | image | success. display the file directly as an image\r
-\r
-# Meaningful aliases for arguments:\r
-path="$1" # Full path of the selected file\r
-width="$2" # Width of the preview pane (number of fitting characters)\r
-height="$3" # Height of the preview pane (number of fitting characters)\r
-cached="$4" # Path that should be used to cache image previews\r
-preview_images="$5" # "True" if image previews are enabled, "False" otherwise.\r
-\r
-maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln\r
-\r
-# Find out something about the file:\r
-mimetype=$(file --mime-type -Lb "$path")\r
-extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}')\r
-\r
-# Functions:\r
-# runs a command and saves its output into $output. Useful if you need\r
-# the return value AND want to use the output in a pipe\r
-try() { output=$(eval '"$@"'); }\r
-\r
-# writes the output of the previously used "try" command\r
-dump() { /bin/echo "$output"; }\r
-\r
-# a common post-processing function used after most commands\r
-trim() { head -n "$maxln"; }\r
-\r
-# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success\r
-safepipe() { "$@"; test $? = 0 -o $? = 141; }\r
-\r
-# Image previews, if enabled in ranger.\r
-if [ "$preview_images" = "True" ]; then\r
- case "$mimetype" in\r
- # Image previews for SVG files, disabled by default.\r
- ###image/svg+xml)\r
- ### convert "$path" "$cached" && exit 6 || exit 1;;\r
- # Image previews for image files. w3mimgdisplay will be called for all\r
- # image files (unless overriden as above), but might fail for\r
- # unsupported types.\r
- image/*)\r
- exit 7;;\r
- # Image preview for video, disabled by default.:\r
- ###video/*)\r
- ### ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;\r
- esac\r
-fi\r
-\r
-case "$extension" in\r
- # Archive extensions:\r
- a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\\r
- rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)\r
- try als "$path" && { dump | trim; exit 0; }\r
- try acat "$path" && { dump | trim; exit 3; }\r
- try bsdtar -lf "$path" && { dump | trim; exit 0; }\r
- exit 1;;\r
- rar)\r
- # avoid password prompt by providing empty password\r
- try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;\r
- 7z)\r
- # avoid password prompt by providing empty password\r
- try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;\r
- # PDF documents:\r
- pdf)\r
- try pdftotext -l 10 -nopgbrk -q "$path" - && \\r
- { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;\r
- # BitTorrent Files\r
- torrent)\r
- try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;\r
- # ODT Files\r
- odt|ods|odp|sxw)\r
- try odt2txt "$path" && { dump | trim; exit 5; } || exit 1;;\r
- # HTML Pages:\r
- htm|html|xhtml)\r
- try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }\r
- ;; # fall back to highlight/cat if the text browsers fail\r
-esac\r
-\r
-case "$mimetype" in\r
- # Syntax highlight for text files:\r
- text/* | */xml)\r
- try safepipe less "$path" && { dump | trim; exit 5; }\r
- exit 2;;\r
- # Ascii-previews of images:\r
- image/*)\r
- img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;\r
- # Display information about media files:\r
- video/* | audio/*)\r
- exiftool "$path" && exit 5\r
- # Use sed to remove spaces so the output fits into the narrow window\r
- try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;\r
-esac\r
-\r
-exit 1\r
+#!/usr/bin/env sh
+# ranger supports enhanced previews. If the option "use_preview_script"
+# is set to True and this file exists, this script will be called and its
+# output is displayed in ranger. ANSI color codes are supported.
+
+# NOTES: This script is considered a configuration file. If you upgrade
+# ranger, it will be left untouched. (You must update it yourself.)
+# Also, ranger disables STDIN here, so interactive scripts won't work properly
+
+# Meanings of exit codes:
+# code | meaning | action of ranger
+# -----+------------+-------------------------------------------
+# 0 | success | success. display stdout as preview
+# 1 | no preview | failure. display no preview at all
+# 2 | plain text | display the plain content of the file
+# 3 | fix width | success. Don't reload when width changes
+# 4 | fix height | success. Don't reload when height changes
+# 5 | fix both | success. Don't ever reload
+# 6 | image | success. display the image $cached points to as an image preview
+# 7 | image | success. display the file directly as an image
+
+# Meaningful aliases for arguments:
+path="$1" # Full path of the selected file
+width="$2" # Width of the preview pane (number of fitting characters)
+height="$3" # Height of the preview pane (number of fitting characters)
+cached="$4" # Path that should be used to cache image previews
+preview_images="$5" # "True" if image previews are enabled, "False" otherwise.
+
+maxln=200 # Stop after $maxln lines. Can be used like ls | head -n $maxln
+
+# Find out something about the file:
+mimetype=$(file --mime-type -Lb "$path")
+extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}')
+
+# Functions:
+# runs a command and saves its output into $output. Useful if you need
+# the return value AND want to use the output in a pipe
+try() { output=$(eval '"$@"'); }
+
+# writes the output of the previously used "try" command
+dump() { /bin/echo "$output"; }
+
+# a common post-processing function used after most commands
+trim() { head -n "$maxln"; }
+
+# wraps highlight to treat exit code 141 (killed by SIGPIPE) as success
+safepipe() { "$@"; test $? = 0 -o $? = 141; }
+
+# Image previews, if enabled in ranger.
+if [ "$preview_images" = "True" ]; then
+ case "$mimetype" in
+ # Image previews for SVG files, disabled by default.
+ ###image/svg+xml)
+ ### convert "$path" "$cached" && exit 6 || exit 1;;
+ # Image previews for image files. w3mimgdisplay will be called for all
+ # image files (unless overriden as above), but might fail for
+ # unsupported types.
+ image/*)
+ exit 7;;
+ # Image preview for video, disabled by default.:
+ ###video/*)
+ ### ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;
+ esac
+fi
+
+case "$extension" in
+ # Archive extensions:
+ a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
+ rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
+ try als "$path" && { dump | trim; exit 0; }
+ try acat "$path" && { dump | trim; exit 3; }
+ try bsdtar -lf "$path" && { dump | trim; exit 0; }
+ exit 1;;
+ rar)
+ # avoid password prompt by providing empty password
+ try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
+ 7z)
+ # avoid password prompt by providing empty password
+ try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
+ # PDF documents:
+ pdf)
+ try pdftotext -l 10 -nopgbrk -q "$path" - && \
+ { dump | trim | fmt -s -w $width; exit 0; } || exit 1;;
+ # BitTorrent Files
+ torrent)
+ try transmission-show "$path" && { dump | trim; exit 5; } || exit 1;;
+ # ODT Files
+ odt|ods|odp|sxw)
+ try odt2txt "$path" && { dump | trim; exit 5; } || exit 1;;
+ # HTML Pages:
+ htm|html|xhtml)
+ try w3m -dump "$path" && { dump | trim | fmt -s -w $width; exit 4; }
+ ;; # fall back to highlight/cat if the text browsers fail
+esac
+
+case "$mimetype" in
+ # Syntax highlight for text files:
+ text/* | */xml)
+ try safepipe less "$path" && { dump | trim; exit 5; }
+ exit 2;;
+ # Ascii-previews of images:
+ image/*)
+ img2txt --gamma=0.6 --width="$width" "$path" && exit 4 || exit 1;;
+ # Display information about media files:
+ video/* | audio/*)
+ exiftool "$path" && exit 5
+ # Use sed to remove spaces so the output fits into the narrow window
+ try mediainfo "$path" && { dump | trim | sed 's/ \+:/: /;'; exit 5; } || exit 1;;
+esac
+
+exit 1
-# .cshrc: executed by C shells on startup\r
-\r
-# If this is login or command shell then change to a sane shell\r
-if ($SHELL != /bin/bash) then\r
- setenv SHELL /bin/bash\r
- if ($?command) then\r
- exec /bin/bash -c "$command"\r
- else\r
- exec /bin/bash\r
- endif\r
-endif\r
-\r
+# .cshrc: executed by C shells on startup
+
+# If this is login or command shell then change to a sane shell
+if ($SHELL != /bin/bash) then
+ setenv SHELL /bin/bash
+ if ($?command) then
+ exec /bin/bash -c "$command"
+ else
+ exec /bin/bash
+ endif
+endif
+
-# Use vi keybindings for everything that uses readline.\r
-\r
-# Useful stuff for UTF-8\r
-set meta-flag on\r
-set input-meta on\r
-set output-meta on\r
-set convert-meta off\r
-\r
-# Adds punctuation as word delimiters\r
-set bind-tty-special-chars off\r
-\r
-# Completion Options\r
-set completion-ignore-case on\r
-set show-all-if-ambiguous on\r
-set show-all-if-unmodified on\r
-set mark-symlinked-directories on\r
-set match-hidden-files off\r
-set page-completions on\r
-set completion-query-items 200\r
-set visible-stats on\r
-set skip-completed-text on\r
-\r
-set editing-mode vi\r
-set keymap vi\r
-\r
-set show-mode-in-prompt on\r
-set vi-ins-mode-string +\r
-set vi-cmd-mode-string -\r
-\r
-set keymap vi-command\r
-"gg": beginning-of-history\r
-"G": end-of-history\r
-"j": history-search-forward\r
-"k": history-search-backward\r
-\r
-$if Bash\r
- # do history expansion when space entered\r
- Space: magic-space\r
-$endif\r
-\r
-set keymap vi-insert\r
-"\e": vi-movement-mode\r
-"jk": vi-movement-mode\r
-Tab: complete\r
-#Tab: menu-complete\r
-\r
-$if Python\r
-$endif\r
-\r
-$if Gdb\r
- "\e[15~": "continue\n"\r
- "\e[21~": "next\n"\r
- "\e[23~": "step\n"\r
- "\eOQ": "nexti\n"\r
- "\eOR": "stepi\n"\r
-$endif\r
-\r
-$if mysql\r
- "\C-xs": "show tables like '%%';\e[D\e[D\e[D"\r
-$endif\r
-\r
-# Include system wide settings which is ignored\r
-# by default if one has own .inputrc\r
-$include ~/inputrc.local\r
+# Use vi keybindings for everything that uses readline.
+
+# Useful stuff for UTF-8
+set meta-flag on
+set input-meta on
+set output-meta on
+set convert-meta off
+
+# Adds punctuation as word delimiters
+set bind-tty-special-chars off
+
+# Completion Options
+set completion-ignore-case on
+set show-all-if-ambiguous on
+set show-all-if-unmodified on
+set mark-symlinked-directories on
+set match-hidden-files off
+set page-completions on
+set completion-query-items 200
+set visible-stats on
+set skip-completed-text on
+
+set editing-mode vi
+set keymap vi
+
+set show-mode-in-prompt on
+set vi-ins-mode-string +
+set vi-cmd-mode-string -
+
+set keymap vi-command
+"gg": beginning-of-history
+"G": end-of-history
+"j": history-search-forward
+"k": history-search-backward
+
+$if Bash
+ # do history expansion when space entered
+ Space: magic-space
+$endif
+
+set keymap vi-insert
+"\e": vi-movement-mode
+"jk": vi-movement-mode
+Tab: complete
+#Tab: menu-complete
+
+$if Python
+$endif
+
+$if Gdb
+ "\e[15~": "continue\n"
+ "\e[21~": "next\n"
+ "\e[23~": "step\n"
+ "\eOQ": "nexti\n"
+ "\eOR": "stepi\n"
+$endif
+
+$if mysql
+ "\C-xs": "show tables like '%%';\e[D\e[D\e[D"
+$endif
+
+# Include system wide settings which is ignored
+# by default if one has own .inputrc
+$include ~/inputrc.local
-bind generic,index Q exit\r
-bind editor <space> noop\r
-bind editor <Tab> complete-query\r
-\r
-bind browser gg top-page\r
-bind browser G bottom-page\r
-bind browser \Cb previous-page\r
-bind browser \Cf next-page\r
-bind browser A check-new\r
-bind browser v view-file\r
-\r
-bind index ~ set-flag\r
-bind index \Cv what-key\r
-bind index H current-top\r
-bind index M current-middle\r
-bind index L current-bottom\r
-bind index / search\r
-bind index : enter-command\r
-bind index i mail\r
-\r
-bind pager i edit\r
-bind pager u mark-as-new\r
-bind pager gg top\r
-bind pager G bottom\r
-bind pager j next-line\r
-bind pager k previous-line\r
-\r
-bind index,attach gg first-entry\r
-bind index,attach G last-entry\r
-\r
-bind index,pager L list-reply\r
-# bind index,pager P print-message\r
-bind index,pager R group-reply\r
-bind index,pager \Cd half-down\r
-bind index,pager \Cu half-up\r
-bind index,pager \Cf next-page\r
-bind index,pager \Cb previous-page\r
-bind index,pager \Cn next-thread\r
-bind index,pager \Cp previous-thread\r
-\r
-bind index,pager f forward-message\r
-bind index,pager p previous-undeleted\r
-bind index,pager N next-unread\r
-bind index,pager P previous-unread\r
-\r
-bind index,pager X print-message\r
-\r
-macro index Z "<shell-escape>mu find --clearlinks --format=links --linksdir=~/.mu/results " "mu find"\r
-macro index S "<change-folder-readonly>~/.mu/results<enter>" "mu find results"\r
-\r
-macro attach s <save-entry><kill-line>$HOME<enter> "Save to default directory for attachments"\r
-\r
-# vim: ft=muttrc\r
+bind generic,index Q exit
+bind editor <space> noop
+bind editor <Tab> complete-query
+
+bind browser gg top-page
+bind browser G bottom-page
+bind browser \Cb previous-page
+bind browser \Cf next-page
+bind browser A check-new
+bind browser v view-file
+
+bind index ~ set-flag
+bind index \Cv what-key
+bind index H current-top
+bind index M current-middle
+bind index L current-bottom
+bind index / search
+bind index : enter-command
+bind index i mail
+
+bind pager i edit
+bind pager u mark-as-new
+bind pager gg top
+bind pager G bottom
+bind pager j next-line
+bind pager k previous-line
+
+bind index,attach gg first-entry
+bind index,attach G last-entry
+
+bind index,pager L list-reply
+# bind index,pager P print-message
+bind index,pager R group-reply
+bind index,pager \Cd half-down
+bind index,pager \Cu half-up
+bind index,pager \Cf next-page
+bind index,pager \Cb previous-page
+bind index,pager \Cn next-thread
+bind index,pager \Cp previous-thread
+
+bind index,pager f forward-message
+bind index,pager p previous-undeleted
+bind index,pager N next-unread
+bind index,pager P previous-unread
+
+bind index,pager X print-message
+
+macro index Z "<shell-escape>mu find --clearlinks --format=links --linksdir=~/.mu/results " "mu find"
+macro index S "<change-folder-readonly>~/.mu/results<enter>" "mu find results"
+
+macro attach s <save-entry><kill-line>$HOME<enter> "Save to default directory for attachments"
+
+# vim: ft=muttrc
-\r
-\r
-- Jannik Zander \r
-\r
-\r
+
+
+- Jannik Zander
+
+
-# default for all\r
-IdentityFile ~/.ssh/id_rsa\r
-\r
-Host localhost git.zndr.dk\r
- HostName localhost\r
- User git\r
-\r
-Host zndr.dk\r
- HostName zndr.dk\r
- User jaz\r
+# default for all
+IdentityFile ~/.ssh/id_rsa
+
+Host localhost git.zndr.dk
+ HostName localhost
+ User git
+
+Host zndr.dk
+ HostName zndr.dk
+ User jaz
-# Setting the prefix from C-b to C-a\r
-set -g prefix C-a\r
-# Free the original Ctrl-b prefix keybinding\r
-unbind C-b\r
-#setting the delay between prefix and command\r
-set -sg escape-time 1\r
-# Ensure that we can send Ctrl-A to other apps\r
-bind C-a send-prefix\r
-# Set the base index for windows to 1 instead of 0\r
-set -g base-index 1\r
-# Set the base index for panes to 1 instead of 0\r
-setw -g pane-base-index 1\r
-\r
-# Set the default terminal mode to 256color mode\r
-set -g default-terminal "screen-256color"\r
-# enable activity alerts\r
-setw -g monitor-activity on\r
-set -g visual-activity on\r
-# set the status line's colors\r
-set -g status-fg white\r
-set -g status-bg black\r
-# set the color of the window list\r
-setw -g window-status-fg cyan\r
-setw -g window-status-bg default\r
-setw -g window-status-attr dim\r
-# set colors for the active window\r
-setw -g window-status-current-fg white\r
-setw -g window-status-current-bg red\r
-setw -g window-status-current-attr bright\r
-# pane colors\r
-set -g pane-border-fg green\r
-set -g pane-border-bg black\r
-set -g pane-active-border-fg white\r
-set -g pane-active-border-bg yellow\r
-# Command / message line\r
-set -g message-fg white\r
-set -g message-bg black\r
-set -g message-attr bright\r
-# Status line left side\r
-set -g status-left-length 40\r
-set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"\r
-set -g status-utf8 on\r
-# Status line right side\r
-# 15% | 28 Nov 18:15\r
-set -g status-right "#(~/battery Discharging) | #[fg=cyan]%d %b %R"\r
-# Update the status bar every sixty seconds\r
-set -g status-interval 60\r
-# Center the window list\r
-set -g status-justify centre\r
-set -g detach-on-destroy off\r
-# Increase history-limit for scrolling (default is 2000)\r
-set-option -g history-limit 15000\r
-# mouse support - set to on if you want to use the mouse\r
-#setw -g mode-mouse on\r
-#set -g mouse-select-pane on\r
-#set -g mouse-resize-pane on\r
-#set -g mouse-select-window on\r
-#set -g mouse-utf8 on\r
-# enable vi keys.\r
-setw -g mode-keys vi\r
-# Reload the file with Prefix r\r
-bind r source-file ~/.tmux.conf \; display "Reloaded!"\r
-# splitting panes\r
-bind c neww -c "#{pane_current_path}"\r
-bind | split-window -h -c "#{pane_current_path}"\r
-bind - split-window -v -c "#{pane_current_path}"\r
-# moving between panes\r
-bind h select-pane -L\r
-bind j select-pane -D\r
-bind k select-pane -U\r
-bind l select-pane -R\r
-# Quick pane selection\r
-bind -r C-h select-window -t :-\r
-bind -r C-l select-window -t :+\r
-# Pane resizing\r
-bind -r H resize-pane -L 5\r
-bind -r J resize-pane -D 5\r
-bind -r K resize-pane -U 5\r
-bind -r L resize-pane -R 5\r
-# Open panes in the same directory using the tmux-panes script\r
-unbind v\r
-unbind n\r
-bind v send-keys " ~/tmux-panes -h" C-m\r
-bind n send-keys " ~/tmux-panes -v" C-m\r
-# Maximize and restore a pane\r
-unbind Up\r
-bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp\r
-unbind Down\r
-bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp\r
-# Log output to a text file on demand\r
-bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"\r
-# better binding for copy mode\r
-bind v copy-mode\r
-# Select/yank like vim\r
-bind -t vi-copy 'v' begin-selection\r
-bind -t vi-copy 'y' copy-selection\r
-# open tree instead of session list\r
-bind s run 'tmuxer choose-session'\r
-bind-key -t vi-choice h tree-collapse\r
-bind-key -t vi-choice l tree-expand\r
-# local/private settings\r
-source-file ~/.tmux_local.conf\r
+# Setting the prefix from C-b to C-a
+set -g prefix C-a
+# Free the original Ctrl-b prefix keybinding
+unbind C-b
+#setting the delay between prefix and command
+set -sg escape-time 1
+# Ensure that we can send Ctrl-A to other apps
+bind C-a send-prefix
+# Set the base index for windows to 1 instead of 0
+set -g base-index 1
+# Set the base index for panes to 1 instead of 0
+setw -g pane-base-index 1
+
+# Set the default terminal mode to 256color mode
+set -g default-terminal "screen-256color"
+# enable activity alerts
+setw -g monitor-activity on
+set -g visual-activity on
+# set the status line's colors
+set -g status-fg white
+set -g status-bg black
+# set the color of the window list
+setw -g window-status-fg cyan
+setw -g window-status-bg default
+setw -g window-status-attr dim
+# set colors for the active window
+setw -g window-status-current-fg white
+setw -g window-status-current-bg red
+setw -g window-status-current-attr bright
+# pane colors
+set -g pane-border-fg green
+set -g pane-border-bg black
+set -g pane-active-border-fg white
+set -g pane-active-border-bg yellow
+# Command / message line
+set -g message-fg white
+set -g message-bg black
+set -g message-attr bright
+# Status line left side
+set -g status-left-length 40
+set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
+set -g status-utf8 on
+# Status line right side
+# 15% | 28 Nov 18:15
+set -g status-right "#(~/battery Discharging) | #[fg=cyan]%d %b %R"
+# Update the status bar every sixty seconds
+set -g status-interval 60
+# Center the window list
+set -g status-justify centre
+set -g detach-on-destroy off
+# Increase history-limit for scrolling (default is 2000)
+set-option -g history-limit 15000
+# mouse support - set to on if you want to use the mouse
+#setw -g mode-mouse on
+#set -g mouse-select-pane on
+#set -g mouse-resize-pane on
+#set -g mouse-select-window on
+#set -g mouse-utf8 on
+# enable vi keys.
+setw -g mode-keys vi
+# Reload the file with Prefix r
+bind r source-file ~/.tmux.conf \; display "Reloaded!"
+# splitting panes
+bind c neww -c "#{pane_current_path}"
+bind | split-window -h -c "#{pane_current_path}"
+bind - split-window -v -c "#{pane_current_path}"
+# moving between panes
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
+# Quick pane selection
+bind -r C-h select-window -t :-
+bind -r C-l select-window -t :+
+# Pane resizing
+bind -r H resize-pane -L 5
+bind -r J resize-pane -D 5
+bind -r K resize-pane -U 5
+bind -r L resize-pane -R 5
+# Open panes in the same directory using the tmux-panes script
+unbind v
+unbind n
+bind v send-keys " ~/tmux-panes -h" C-m
+bind n send-keys " ~/tmux-panes -v" C-m
+# Maximize and restore a pane
+unbind Up
+bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
+unbind Down
+bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
+# Log output to a text file on demand
+bind P pipe-pane -o "cat >>~/#W.log" \; display "Toggled logging to ~/#W.log"
+# better binding for copy mode
+bind v copy-mode
+# Select/yank like vim
+bind -t vi-copy 'v' begin-selection
+bind -t vi-copy 'y' copy-selection
+# open tree instead of session list
+bind s run 'tmuxer choose-session'
+bind-key -t vi-choice h tree-collapse
+bind-key -t vi-choice l tree-expand
+# local/private settings
+source-file ~/.tmux_local.conf
-#!/bin/sh\r
-\r
-sudo dnf install kernel-$1\r
-sudo dnf install akmod-wl "kernel-devel-uname-r == $(uname -r)"\r
-sudo akmods\r
+#!/bin/sh
+
+sudo dnf install kernel-$1
+sudo dnf install akmod-wl "kernel-devel-uname-r == $(uname -r)"
+sudo akmods
-#!/bin/sh\r
-make PREFIX=$PREFIX MULTILIB=lib\r
-make install PREFIX=$PREFIX/apps/luajit MULTILIB=lib\r
+#!/bin/sh
+make PREFIX=$PREFIX MULTILIB=lib
+make install PREFIX=$PREFIX/apps/luajit MULTILIB=lib
-#!/bin/sh\r
-\r
-./configure \\r
---prefix=$PREFIX \\r
---with-features=huge \\r
---with-compiledby="ejannza" \\r
---enable-multibyte \\r
---enable-gui=gtk2 \\r
---enable-luainterp \\r
---with-lua-prefix=$PREFIX --with-luajit \\r
---enable-gpm \\r
---enable-cscope \\r
---enable-fontset \\r
---enable-fail-if-missing\r
-\r
-\r
-make\r
-make install prefix=$PREFIX/apps/vim\r
+#!/bin/sh
+
+./configure \
+--prefix=$PREFIX \
+--with-features=huge \
+--with-compiledby="ejannza" \
+--enable-multibyte \
+--enable-gui=gtk2 \
+--enable-luainterp \
+--with-lua-prefix=$PREFIX --with-luajit \
+--enable-gpm \
+--enable-cscope \
+--enable-fontset \
+--enable-fail-if-missing
+
+
+make
+make install prefix=$PREFIX/apps/vim
-#NoEnv\r
-SendMode Input\r
-\r
-; Disable default CapsLock functionality\r
-SetCapsLockState, AlwaysOff\r
-\r
-; Post Esc if pressed alone\r
-CapsLock::\r
-\r
- ; If you want to override CapsLock functionality for specific windows, etc.\r
- ; Just define an OverrideCapsLock() function where you #include this script!\r
- OverrideFunction := "OverrideCapsLock"\r
- \r
- ; Call the function dynamically to allow for silent failure.\r
- if (Overridden := %OverrideFunction%()) {\r
- Send {%Overridden%}\r
- return\r
- }\r
- \r
- KeyWait, CapsLock\r
- if (A_PriorKey="CapsLock")\r
- Send {Esc}\r
-return\r
-\r
-; Map CapsLock modified hjkl movement\r
-#If, GetKeyState("CapsLock", "P")\r
-h::Left\r
-j::Down\r
-k::Up\r
-l::Right\r
-#If\r
+#NoEnv
+SendMode Input
+
+; Disable default CapsLock functionality
+SetCapsLockState, AlwaysOff
+
+; Post Esc if pressed alone
+CapsLock::
+
+ ; If you want to override CapsLock functionality for specific windows, etc.
+ ; Just define an OverrideCapsLock() function where you #include this script!
+ OverrideFunction := "OverrideCapsLock"
+
+ ; Call the function dynamically to allow for silent failure.
+ if (Overridden := %OverrideFunction%()) {
+ Send {%Overridden%}
+ return
+ }
+
+ KeyWait, CapsLock
+ if (A_PriorKey="CapsLock")
+ Send {Esc}
+return
+
+; Map CapsLock modified hjkl movement
+#If, GetKeyState("CapsLock", "P")
+h::Left
+j::Down
+k::Up
+l::Right
+#If
-@echo off\r
-SET vim_path = %USERPROFILE%\apps\vim\vim73\gvim.exe\r
-> edit_with_vim.reg ECHO REGEDIT4\r
->> edit_with_vim.reg ECHO [HKEY_CLASSES_ROOT\*\shell\vim]\r
->> edit_with_vim.reg ECHO @="Edit with &Vim"\r
->> edit_with_vim.reg ECHO [HKEY_CLASSES_ROOT\*\shell\vim\command]\r
-SET v_test=%USERPROFILE%\apps\vim\vim73\gvim.exe\r
-Set v_replacement=\\\r
-SET v_result=%v_test:\=\\%\r
+@echo off
+SET vim_path = %USERPROFILE%\apps\vim\vim73\gvim.exe
+> edit_with_vim.reg ECHO REGEDIT4
+>> edit_with_vim.reg ECHO [HKEY_CLASSES_ROOT\*\shell\vim]
+>> edit_with_vim.reg ECHO @="Edit with &Vim"
+>> edit_with_vim.reg ECHO [HKEY_CLASSES_ROOT\*\shell\vim\command]
+SET v_test=%USERPROFILE%\apps\vim\vim73\gvim.exe
+Set v_replacement=\\
+SET v_result=%v_test:\=\\%
>> edit_with_vim.reg ECHO @="%v_result% \"%%1\""
\ No newline at end of file
-#!/bin/sh\r
-# Copyright 2010 - 2012, Tim Henigan <tim.henigan@gmail.com>\r
-#\r
-# Permission is hereby granted, free of charge, to any person obtaining\r
-# a copy of this software and associated documentation files (the\r
-# "Software"), to deal in the Software without restriction, including\r
-# without limitation the rights to use, copy, modify, merge, publish,\r
-# distribute, sublicense, and/or sell copies of the Software, and to\r
-# permit persons to whom the Software is furnished to do so, subject to\r
-# the following conditions:\r
-#\r
-# The above copyright notice and this permission notice shall be included\r
-# in all copies or substantial portions of the Software.\r
-#\r
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS\r
-# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\r
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\r
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\r
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\r
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
-\r
-\r
-# Perform a directory diff between commits in the repository using\r
-# the external diff or merge tool specified in the user's config.\r
-\r
-USAGE='[--cached] [--copy-back] [-x|--extcmd=<command>] <commit>{0,2} [-- <path>*]\r
-\r
- --cached Compare to the index rather than the working tree.\r
-\r
- --copy-back Copy files back to the working tree when the diff\r
- tool exits (in case they were modified by the\r
- user). This option is only valid if the diff\r
- compared with the working tree.\r
-\r
- -x=<command>\r
- --extcmd=<command> Specify a custom command for viewing diffs.\r
- git-diffall ignores the configured defaults and\r
- runs $command $LOCAL $REMOTE when this option is\r
- specified. Additionally, $BASE is set in the\r
- environment.\r
-'\r
-\r
-SUBDIRECTORY_OK=1\r
-. "$(git --exec-path)/git-sh-setup"\r
-\r
-TOOL_MODE=diff\r
-. "$(git --exec-path)/git-mergetool--lib"\r
-\r
-merge_tool="$(get_merge_tool)"\r
-if test -z "$merge_tool"\r
-then\r
- echo "Error: Either the 'diff.tool' or 'merge.tool' option must be set."\r
- usage\r
-fi\r
-\r
-start_dir=$(pwd)\r
-\r
-# All the file paths returned by the diff command are relative to the root\r
-# of the working copy. So if the script is called from a subdirectory, it\r
-# must switch to the root of working copy before trying to use those paths.\r
-cdup=$(git rev-parse --show-cdup) &&\r
-cd "$cdup" || {\r
- echo >&2 "Cannot chdir to $cdup, the toplevel of the working tree"\r
- exit 1\r
-}\r
-\r
-# set up temp dir\r
-tmp=$(perl -e 'use File::Temp qw(tempdir);\r
- $t=tempdir("/tmp/git-diffall.XXXXX") or exit(1);\r
- print $t') || exit 1\r
-#trap 'rm -rf "$tmp"' EXIT\r
-\r
-left=\r
-right=\r
-paths=\r
-dashdash_seen=\r
-compare_staged=\r
-merge_base=\r
-left_dir=\r
-right_dir=\r
-diff_tool=\r
-copy_back=\r
-\r
-while test $# != 0\r
-do\r
- case "$1" in\r
- -h|--h|--he|--hel|--help)\r
- usage\r
- ;;\r
- --cached)\r
- compare_staged=1\r
- ;;\r
- --copy-back)\r
- copy_back=1\r
- ;;\r
- -x|--e|--ex|--ext|--extc|--extcm|--extcmd)\r
- if test $# = 1\r
- then\r
- echo You must specify the tool for use with --extcmd\r
- usage\r
- else\r
- diff_tool=$2\r
- shift\r
- fi\r
- ;;\r
- --)\r
- dashdash_seen=1\r
- ;;\r
- -*)\r
- echo Invalid option: "$1"\r
- usage\r
- ;;\r
- *)\r
- # could be commit, commit range or path limiter\r
- case "$1" in\r
- *...*)\r
- left=${1%...*}\r
- right=${1#*...}\r
- merge_base=1\r
- ;;\r
- *..*)\r
- left=${1%..*}\r
- right=${1#*..}\r
- ;;\r
- *)\r
- if test -n "$dashdash_seen"\r
- then\r
- paths="$paths$1 "\r
- elif test -z "$left"\r
- then\r
- left=$1\r
- elif test -z "$right"\r
- then\r
- right=$1\r
- else\r
- paths="$paths$1 "\r
- fi\r
- ;;\r
- esac\r
- ;;\r
- esac\r
- shift\r
-done\r
-\r
-# Determine the set of files which changed\r
-if test -n "$left" && test -n "$right"\r
-then\r
- left_dir="cmt-$(git rev-parse --short $left)"\r
- right_dir="cmt-$(git rev-parse --short $right)"\r
-\r
- if test -n "$compare_staged"\r
- then\r
- usage\r
- elif test -n "$merge_base"\r
- then\r
- git diff --name-only "$left"..."$right" -- $paths >"$tmp/filelist"\r
- else\r
- git diff --name-only "$left" "$right" -- $paths >"$tmp/filelist"\r
- fi\r
-elif test -n "$left"\r
-then\r
- left_dir="cmt-$(git rev-parse --short $left)"\r
-\r
- if test -n "$compare_staged"\r
- then\r
- right_dir="staged"\r
- git diff --name-only --cached "$left" -- $paths >"$tmp/filelist"\r
- else\r
- right_dir="working_tree"\r
- git diff --name-only "$left" -- $paths >"$tmp/filelist"\r
- fi\r
-else\r
- left_dir="HEAD"\r
-\r
- if test -n "$compare_staged"\r
- then\r
- right_dir="staged"\r
- git diff --name-only --cached -- $paths >"$tmp/filelist"\r
- else\r
- right_dir="working_tree"\r
- git diff --name-only -- $paths >"$tmp/filelist"\r
- fi\r
-fi\r
-\r
-# Exit immediately if there are no diffs\r
-if test ! -s "$tmp/filelist"\r
-then\r
- exit 0\r
-fi\r
-\r
-if test -n "$copy_back" && test "$right_dir" != "working_tree"\r
-then\r
- echo "--copy-back is only valid when diff includes the working tree."\r
- exit 1\r
-fi\r
-\r
-# Create the named tmp directories that will hold the files to be compared\r
-mkdir -p "$tmp/$left_dir" "$tmp/$right_dir"\r
-\r
-# Populate the tmp/right_dir directory with the files to be compared\r
-while read name\r
-do\r
- if test -n "$right"\r
- then\r
- ls_list=$(git ls-tree $right "$name")\r
- if test -n "$ls_list"\r
- then\r
- mkdir -p "$tmp/$right_dir/$(dirname "$name")"\r
- git show "$right":"$name" >"$tmp/$right_dir/$name" || true\r
- fi\r
- elif test -n "$compare_staged"\r
- then\r
- ls_list=$(git ls-files -- "$name")\r
- if test -n "$ls_list"\r
- then\r
- mkdir -p "$tmp/$right_dir/$(dirname "$name")"\r
- git show :"$name" >"$tmp/$right_dir/$name"\r
- fi\r
- else\r
- if test -e "$name"\r
- then\r
- mkdir -p "$tmp/$right_dir/$(dirname "$name")"\r
- cp "$name" "$tmp/$right_dir/$name"\r
- fi\r
- fi\r
-done < "$tmp/filelist"\r
-\r
-# Populate the tmp/left_dir directory with the files to be compared\r
-while read name\r
-do\r
- if test -n "$left"\r
- then\r
- ls_list=$(git ls-tree $left "$name")\r
- if test -n "$ls_list"\r
- then\r
- mkdir -p "$tmp/$left_dir/$(dirname "$name")"\r
- git show "$left":"$name" >"$tmp/$left_dir/$name" || true\r
- fi\r
- else\r
- if test -n "$compare_staged"\r
- then\r
- ls_list=$(git ls-tree HEAD "$name")\r
- if test -n "$ls_list"\r
- then\r
- mkdir -p "$tmp/$left_dir/$(dirname "$name")"\r
- git show HEAD:"$name" >"$tmp/$left_dir/$name"\r
- fi\r
- else\r
- mkdir -p "$tmp/$left_dir/$(dirname "$name")"\r
- git show :"$name" >"$tmp/$left_dir/$name"\r
- fi\r
- fi\r
-done < "$tmp/filelist"\r
-\r
-LOCAL="$tmp/$left_dir"\r
-REMOTE="$tmp/$right_dir"\r
-\r
-if test -n "$diff_tool"\r
-then\r
- export BASE\r
- eval $diff_tool '"$LOCAL"' '"$REMOTE"'\r
-else\r
- run_merge_tool "$merge_tool" false\r
-fi\r
-\r
-# Copy files back to the working dir, if requested\r
-if test -n "$copy_back" && test "$right_dir" = "working_tree"\r
-then\r
- cd "$start_dir"\r
- git_top_dir=$(git rev-parse --show-toplevel)\r
- find "$tmp/$right_dir" -type f |\r
- while read file\r
- do\r
- cp "$file" "$git_top_dir/${file#$tmp/$right_dir/}"\r
- done\r
+#!/bin/sh
+# Copyright 2010 - 2012, Tim Henigan <tim.henigan@gmail.com>
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+
+# Perform a directory diff between commits in the repository using
+# the external diff or merge tool specified in the user's config.
+
+USAGE='[--cached] [--copy-back] [-x|--extcmd=<command>] <commit>{0,2} [-- <path>*]
+
+ --cached Compare to the index rather than the working tree.
+
+ --copy-back Copy files back to the working tree when the diff
+ tool exits (in case they were modified by the
+ user). This option is only valid if the diff
+ compared with the working tree.
+
+ -x=<command>
+ --extcmd=<command> Specify a custom command for viewing diffs.
+ git-diffall ignores the configured defaults and
+ runs $command $LOCAL $REMOTE when this option is
+ specified. Additionally, $BASE is set in the
+ environment.
+'
+
+SUBDIRECTORY_OK=1
+. "$(git --exec-path)/git-sh-setup"
+
+TOOL_MODE=diff
+. "$(git --exec-path)/git-mergetool--lib"
+
+merge_tool="$(get_merge_tool)"
+if test -z "$merge_tool"
+then
+ echo "Error: Either the 'diff.tool' or 'merge.tool' option must be set."
+ usage
+fi
+
+start_dir=$(pwd)
+
+# All the file paths returned by the diff command are relative to the root
+# of the working copy. So if the script is called from a subdirectory, it
+# must switch to the root of working copy before trying to use those paths.
+cdup=$(git rev-parse --show-cdup) &&
+cd "$cdup" || {
+ echo >&2 "Cannot chdir to $cdup, the toplevel of the working tree"
+ exit 1
+}
+
+# set up temp dir
+tmp=$(perl -e 'use File::Temp qw(tempdir);
+ $t=tempdir("/tmp/git-diffall.XXXXX") or exit(1);
+ print $t') || exit 1
+#trap 'rm -rf "$tmp"' EXIT
+
+left=
+right=
+paths=
+dashdash_seen=
+compare_staged=
+merge_base=
+left_dir=
+right_dir=
+diff_tool=
+copy_back=
+
+while test $# != 0
+do
+ case "$1" in
+ -h|--h|--he|--hel|--help)
+ usage
+ ;;
+ --cached)
+ compare_staged=1
+ ;;
+ --copy-back)
+ copy_back=1
+ ;;
+ -x|--e|--ex|--ext|--extc|--extcm|--extcmd)
+ if test $# = 1
+ then
+ echo You must specify the tool for use with --extcmd
+ usage
+ else
+ diff_tool=$2
+ shift
+ fi
+ ;;
+ --)
+ dashdash_seen=1
+ ;;
+ -*)
+ echo Invalid option: "$1"
+ usage
+ ;;
+ *)
+ # could be commit, commit range or path limiter
+ case "$1" in
+ *...*)
+ left=${1%...*}
+ right=${1#*...}
+ merge_base=1
+ ;;
+ *..*)
+ left=${1%..*}
+ right=${1#*..}
+ ;;
+ *)
+ if test -n "$dashdash_seen"
+ then
+ paths="$paths$1 "
+ elif test -z "$left"
+ then
+ left=$1
+ elif test -z "$right"
+ then
+ right=$1
+ else
+ paths="$paths$1 "
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ shift
+done
+
+# Determine the set of files which changed
+if test -n "$left" && test -n "$right"
+then
+ left_dir="cmt-$(git rev-parse --short $left)"
+ right_dir="cmt-$(git rev-parse --short $right)"
+
+ if test -n "$compare_staged"
+ then
+ usage
+ elif test -n "$merge_base"
+ then
+ git diff --name-only "$left"..."$right" -- $paths >"$tmp/filelist"
+ else
+ git diff --name-only "$left" "$right" -- $paths >"$tmp/filelist"
+ fi
+elif test -n "$left"
+then
+ left_dir="cmt-$(git rev-parse --short $left)"
+
+ if test -n "$compare_staged"
+ then
+ right_dir="staged"
+ git diff --name-only --cached "$left" -- $paths >"$tmp/filelist"
+ else
+ right_dir="working_tree"
+ git diff --name-only "$left" -- $paths >"$tmp/filelist"
+ fi
+else
+ left_dir="HEAD"
+
+ if test -n "$compare_staged"
+ then
+ right_dir="staged"
+ git diff --name-only --cached -- $paths >"$tmp/filelist"
+ else
+ right_dir="working_tree"
+ git diff --name-only -- $paths >"$tmp/filelist"
+ fi
+fi
+
+# Exit immediately if there are no diffs
+if test ! -s "$tmp/filelist"
+then
+ exit 0
+fi
+
+if test -n "$copy_back" && test "$right_dir" != "working_tree"
+then
+ echo "--copy-back is only valid when diff includes the working tree."
+ exit 1
+fi
+
+# Create the named tmp directories that will hold the files to be compared
+mkdir -p "$tmp/$left_dir" "$tmp/$right_dir"
+
+# Populate the tmp/right_dir directory with the files to be compared
+while read name
+do
+ if test -n "$right"
+ then
+ ls_list=$(git ls-tree $right "$name")
+ if test -n "$ls_list"
+ then
+ mkdir -p "$tmp/$right_dir/$(dirname "$name")"
+ git show "$right":"$name" >"$tmp/$right_dir/$name" || true
+ fi
+ elif test -n "$compare_staged"
+ then
+ ls_list=$(git ls-files -- "$name")
+ if test -n "$ls_list"
+ then
+ mkdir -p "$tmp/$right_dir/$(dirname "$name")"
+ git show :"$name" >"$tmp/$right_dir/$name"
+ fi
+ else
+ if test -e "$name"
+ then
+ mkdir -p "$tmp/$right_dir/$(dirname "$name")"
+ cp "$name" "$tmp/$right_dir/$name"
+ fi
+ fi
+done < "$tmp/filelist"
+
+# Populate the tmp/left_dir directory with the files to be compared
+while read name
+do
+ if test -n "$left"
+ then
+ ls_list=$(git ls-tree $left "$name")
+ if test -n "$ls_list"
+ then
+ mkdir -p "$tmp/$left_dir/$(dirname "$name")"
+ git show "$left":"$name" >"$tmp/$left_dir/$name" || true
+ fi
+ else
+ if test -n "$compare_staged"
+ then
+ ls_list=$(git ls-tree HEAD "$name")
+ if test -n "$ls_list"
+ then
+ mkdir -p "$tmp/$left_dir/$(dirname "$name")"
+ git show HEAD:"$name" >"$tmp/$left_dir/$name"
+ fi
+ else
+ mkdir -p "$tmp/$left_dir/$(dirname "$name")"
+ git show :"$name" >"$tmp/$left_dir/$name"
+ fi
+ fi
+done < "$tmp/filelist"
+
+LOCAL="$tmp/$left_dir"
+REMOTE="$tmp/$right_dir"
+
+if test -n "$diff_tool"
+then
+ export BASE
+ eval $diff_tool '"$LOCAL"' '"$REMOTE"'
+else
+ run_merge_tool "$merge_tool" false
+fi
+
+# Copy files back to the working dir, if requested
+if test -n "$copy_back" && test "$right_dir" = "working_tree"
+then
+ cd "$start_dir"
+ git_top_dir=$(git rev-parse --show-toplevel)
+ find "$tmp/$right_dir" -type f |
+ while read file
+ do
+ cp "$file" "$git_top_dir/${file#$tmp/$right_dir/}"
+ done
fi
\ No newline at end of file