home
/
code
/
khome.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5fd199
)
Allow space-separated title words
author
Siraaj Khandkar
<siraaj@khandkar.net>
Tue, 4 Jan 2022 16:37:25 +0000
(11:37 -0500)
committer
Siraaj Khandkar
<siraaj@khandkar.net>
Tue, 4 Jan 2022 16:47:18 +0000
(11:47 -0500)
home/bin/x
patch
|
blob
|
blame
|
history
diff --git
a/home/bin/x
b/home/bin/x
index
0faa918
..
59a4710
100755
(executable)
--- a/
home/bin/x
+++ b/
home/bin/x
@@
-2,15
+2,15
@@
set -e;
-name=
"$1"
;
+name=
$(echo "$@" | sed 's/\s\+/-/g')
;
if [ "$name" != "" ];
then
- timestamp=
`date +'%F--%H-%M--%S'`
;
+ timestamp=
$(date +'%F--%H-%M--%S')
;
directory="$HOME/x/$timestamp--$name";
mkdir -p "$directory";
cd "$directory";
-
echo "# $name\n" > README.md
;
+
printf '# %s\n' "$name" > README
;
git init >&2
git add . >&2
git commit -m 'Initial commit' >&2
This page took
0.030848 seconds
and
4
git commands to generate.