Skip to content

Commit 3b51797

Browse files
author
Konrad Lother
committed
clean up
1 parent 4636b61 commit 3b51797

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

file.bash

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,19 @@ cmd_retrieve() {
6565

6666
cmd_edit() {
6767
local path="$1"
68-
local passfile="$PREFIX/$path.gpg"
6968

70-
if [[ ${path: -4} != ".b64" ]]; then
71-
path="${path}.b64"
72-
fi
7369
if [[ -z $path ]]; then
7470
print_usage
75-
elif [[ -z $EDITOR ]]; then
71+
fi
72+
73+
if [[ -z $EDITOR ]]; then
7674
echo "\$EDITOR not set, don't know how to open file."
7775
exit 1
7876
else
7977
check_sneaky_paths "$path"
8078
local tmpfile=$(mktemp)
8179
chmod 0600 $tmpfile
82-
cmd_retrieve $path $passfile > $tmpfile
80+
cmd_retrieve $path > $tmpfile
8381
$EDITOR $tmpfile
8482
PASS_FILE_FORCE_OVERWRITE="true" cmd_store $path $tmpfile
8583
rm $tmpfile

0 commit comments

Comments
 (0)