feat(journal): quiet typora execution
This commit is contained in:
parent
91083a62c2
commit
c685a1c35e
1 changed files with 1 additions and 10 deletions
11
journal.sh
11
journal.sh
|
|
@ -9,15 +9,6 @@ journal_dir="${notes_dir}/Journal"
|
||||||
month_dir=$(date +"%m %b")
|
month_dir=$(date +"%m %b")
|
||||||
typora_flag=false
|
typora_flag=false
|
||||||
|
|
||||||
# Parse options
|
|
||||||
while getopts "t" opt; do
|
|
||||||
case "$opt" in
|
|
||||||
t)
|
|
||||||
typora_flag=true # -t was given
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
# parse string args (when used as a function and passed "$@")
|
# parse string args (when used as a function and passed "$@")
|
||||||
POSITIONAL_ARGS=()
|
POSITIONAL_ARGS=()
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
|
|
@ -49,7 +40,7 @@ function createEntry() {
|
||||||
|
|
||||||
# Open in editor
|
# Open in editor
|
||||||
if [ "$typora_flag" = true ]; then
|
if [ "$typora_flag" = true ]; then
|
||||||
typora "$full_path"
|
typora "$full_path" > /dev/null 2>/dev/null
|
||||||
else
|
else
|
||||||
vim "$full_path"
|
vim "$full_path"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue