File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,9 +111,9 @@ main() {
111111 if [[ " $ACTION " = get ]]; then
112112 response=$( printf " %s\n\n" " $( op document " $ACTION " " $DOCUMENT_NAME " --vault " $VAULT " --session=" $session " 2>&1 ) " )
113113 elif [[ " $ACTION " = create ]]; then
114- response=$( op document " $ACTION " " $LOCAL_DOT_ENV " --file-name " $DOCUMENT_NAME " --vault " $VAULT " --session=" $session " 2>&1 )
114+ response=$( op document " $ACTION " " $LOCAL_DOT_ENV " --file-name " $DOCUMENT_NAME .txt " --title " $DOCUMENT_NAME " --vault " $VAULT " --session=" $session " 2>&1 )
115115 elif [[ " $ACTION " = edit ]]; then
116- response=$( op document " $ACTION " " $DOCUMENT_NAME " " $LOCAL_DOT_ENV " --file-name " $DOCUMENT_NAME " --vault " $VAULT " --session=" $session " 2>&1 )
116+ response=$( op document " $ACTION " " $DOCUMENT_NAME " " $LOCAL_DOT_ENV " --file-name " $DOCUMENT_NAME .txt " --title " $DOCUMENT_NAME " --vault " $VAULT " --session=" $session " 2>&1 )
117117 elif [[ " $ACTION " = edit-inline ]]; then
118118 download_document_to_temp_location
119119 ${VISUAL:- ${EDITOR:- vim} } " $tmpFile "
@@ -122,7 +122,7 @@ main() {
122122 printf " \nPress\n - Y to upload the edited document\n - V to view the edited document\n - E to continue editing\n - C to cancel\n\n"
123123 read -rp " : " subaction
124124 case $subaction in
125- [Yy]* ) response=$( op document edit " $DOCUMENT_NAME " " $tmpFile " --file-name " $DOCUMENT_NAME " --vault " $VAULT " --session=" $session " 2>&1 ) ; break ;;
125+ [Yy]* ) response=$( op document edit " $DOCUMENT_NAME " " $tmpFile " --file-name " $DOCUMENT_NAME .txt " --title " $DOCUMENT_NAME " --vault " $VAULT " --session=" $session " 2>&1 ) ; break ;;
126126 [Vv]* ) cat " $tmpFile " ;;
127127 [Ee]* ) ${VISUAL:- ${EDITOR:- vim} } " $tmpFile " ;;
128128 [Cc]* ) break ;;
You can’t perform that action at this time.
0 commit comments