ilast command to display edited files ordered by time - notes - a console notes manager using git Err bitreich.org 70
1Log /scm/notes/log.gph bitreich.org 70
1Files /scm/notes/files.gph bitreich.org 70
1Refs /scm/notes/refs.gph bitreich.org 70
1Tags /scm/notes/tag bitreich.org 70
1LICENSE /scm/notes/file/LICENSE.gph bitreich.org 70
i--- Err bitreich.org 70
1commit e5b96dbf99c8250f3b5287f5c0d75dd65640edd3 /scm/notes/commit/e5b96dbf99c8250f3b5287f5c0d75dd65640edd3.gph bitreich.org 70
1parent ce023c3de7b4912fd987ab660606a8a67a88c47d /scm/notes/commit/ce023c3de7b4912fd987ab660606a8a67a88c47d.gph bitreich.org 70
hAuthor: Solene Rapenne <solene@perso.pw> URL:mailto:solene@perso.pw bitreich.org 70
iDate: Fri, 13 Jul 2018 18:29:41 +0200 Err bitreich.org 70
i Err bitreich.org 70
ilast command to display edited files ordered by time Err bitreich.org 70
i Err bitreich.org 70
iDiffstat: Err bitreich.org 70
i M notes | 20 ++++++++++++++++++++ Err bitreich.org 70
i Err bitreich.org 70
i1 file changed, 20 insertions(+), 0 deletions(-) Err bitreich.org 70
i--- Err bitreich.org 70
1diff --git a/notes b/notes /scm/notes/file/notes.gph bitreich.org 70
i@@ -86,6 +86,22 @@ delete() { Err bitreich.org 70
i fi Err bitreich.org 70
i } Err bitreich.org 70
i Err bitreich.org 70
i+# display the list of edited files ordered by time Err bitreich.org 70
i+last() { Err bitreich.org 70
i+ DEST="$1" Err bitreich.org 70
i+ cd "$REPO" Err bitreich.org 70
i+ git log --pretty="%cr" --name-only | \ Err bitreich.org 70
i+ awk '{ Err bitreich.org 70
i+ date=$0 ; Err bitreich.org 70
i+ getline; getline; Err bitreich.org 70
i+ file=$0 ; Err bitreich.org 70
i+ seen[file]++; Err bitreich.org 70
i+ if(seen[file]==1) { Err bitreich.org 70
i+ printf("%20s: %s\n", date, file) Err bitreich.org 70
i+ } Err bitreich.org 70
i+ }' Err bitreich.org 70
i+} Err bitreich.org 70
i+ Err bitreich.org 70
i # create a git repo Err bitreich.org 70
i initialization() { Err bitreich.org 70
i cd $REPO Err bitreich.org 70
i@@ -116,5 +132,9 @@ if expr "$PARAM1" : "^hi" >/dev/null && [ -n "$PARAM2" ]; then histo "$PARAM2" ; Err bitreich.org 70
i if expr "$PARAM1" : "^c" >/dev/null && [ -n "$PARAM2" ]; then show_file "$PARAM2" ; exit 0 ; fi Err bitreich.org 70
i if [ "$PARAM1" = "rm" ] && [ -n "$PARAM2" ]; then delete "$PARAM2" ; exit 0 ; fi Err bitreich.org 70
i if expr "$PARAM1" : "^he" >/dev/null ; then usage ; exit 0 ; fi Err bitreich.org 70
i+if expr "$PARAM1" : "^l" >/dev/null ; then last; exit 0 ; fi Err bitreich.org 70
i Err bitreich.org 70
i+if [ -f "${REPO}/${PARAM1}" ] ; then edit "$PARAM1" ; exit 0 ; fi Err bitreich.org 70
i Err bitreich.org 70
i+# nothing matched Err bitreich.org 70
i+echo "${PARAM1} is not a valid command or an existing filename" && exit 5 Err bitreich.org 70
.
Response:
text/plain