We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 91627eb + 8d66590 commit 3d77cf0Copy full SHA for 3d77cf0
_helpers/helpers.sh
@@ -85,7 +85,13 @@ function previewnotes {
85
86
}
87
88
-
+function opennote {
89
+ if [ -z "$EDITOR" ]; then
90
+ open $1
91
+ else
92
+ eval "$EDITOR $1"
93
+ fi
94
+}
95
96
# help
97
# --------------------------------------------------
bin/notes
@@ -125,7 +125,7 @@ while getopts "$optstring" opt; do
125
n)
126
checkname "$OPTARG"
127
mkdir -p $(dirname "$OPTARG${_ext}") && touch "$OPTARG${_ext}"
128
- open "$OPTARG${_ext}"
+ opennote "$OPTARG${_ext}"
129
exit 0
130
;;
131
@@ -215,7 +215,7 @@ if [ -z "$2" ]; then
215
216
fi
217
218
- open $1${_ext}
+ opennote $1${_ext}
219
220
221
0 commit comments