X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=gitconfig.m4;h=1b7dc454db2d3494ca54cdd5824e0be4bc85f971;hb=17f6bf8640f51f1dc043106670edb39d22d2a5c6;hp=1977f2e67955ff47e85d4a29e2ac8b6ee353b383;hpb=cf2f4142baba6dc0bcc9d8af37e83cb8ca3add0e;p=config%2Fdotfiles.git diff --git a/gitconfig.m4 b/gitconfig.m4 index 1977f2e..1b7dc45 100644 --- a/gitconfig.m4 +++ b/gitconfig.m4 @@ -127,6 +127,24 @@ include(../lib.m4) \"Backup on $(date -R)\" >/dev/null \ && git stash apply >/dev/null" + # Display list and content of untracked files. Untracked directories + # and symbolic links are only listed. + u = "! git ls-files --other --exclude-standard --directory -z \ + | xargs -0 sh -c '\ + for x; do \ + printf \"\\033[1;33m-> %s\\033[0m:\" \"$x\"; \ + if test -d \"$x\"; then \ + echo \" directory\"; \ + elif test -h \"$x\"; then \ + echo \" symbolic link\"; \ + else \ + echo; \ + cat \"$x\"; \ + fi; \ + echo; \ + done' argv0 \ + | less" + [diff] # Detect copies and renames. renames = copy