mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
Add note tool
This commit is contained in:
parent
d084841d56
commit
3c50b3276d
1 changed files with 18 additions and 0 deletions
18
shell/notes
Executable file
18
shell/notes
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
function note() {
|
||||||
|
(
|
||||||
|
local title="$1"
|
||||||
|
local timestamp="$(date +%Y-%m-%dT%H:%M:%S%z)"
|
||||||
|
local dir="${HOME}/Dropbox/Notes"
|
||||||
|
|
||||||
|
mkdir -p "${dir}"
|
||||||
|
cd "${dir}"
|
||||||
|
if [[ -n $1 ]]; then
|
||||||
|
exec vim "$timestamp-$title.md"
|
||||||
|
else
|
||||||
|
exec vim .
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: ft=zsh
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue