Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
password-store
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Karl Fogel
password-store
Commits
af8b52b2
Commit
af8b52b2
authored
10 years ago
by
Jason A. Donenfeld
Browse files
Options
Downloads
Patches
Plain Diff
git: the grammar nazis win
parent
6cbdb2d6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/password-store.sh
+10
-10
10 additions, 10 deletions
src/password-store.sh
with
10 additions
and
10 deletions
src/password-store.sh
+
10
−
10
View file @
af8b52b2
...
@@ -283,7 +283,7 @@ cmd_init() {
...
@@ -283,7 +283,7 @@ cmd_init() {
rm
-v
-f
"
$gpg_id
"
||
exit
1
rm
-v
-f
"
$gpg_id
"
||
exit
1
if
[[
-d
$GIT_DIR
]]
;
then
if
[[
-d
$GIT_DIR
]]
;
then
git
rm
-qr
"
$gpg_id
"
git
rm
-qr
"
$gpg_id
"
git_commit
"Deinitialize
d
${
gpg_id
}
."
git_commit
"Deinitialize
${
gpg_id
}
."
fi
fi
rmdir
-p
"
${
gpg_id
%/*
}
"
2>/dev/null
rmdir
-p
"
${
gpg_id
%/*
}
"
2>/dev/null
else
else
...
@@ -296,7 +296,7 @@ cmd_init() {
...
@@ -296,7 +296,7 @@ cmd_init() {
agent_check
agent_check
reencrypt_path
"
$PREFIX
/
$id_path
"
reencrypt_path
"
$PREFIX
/
$id_path
"
git_add_file
"
$PREFIX
/
$id_path
"
"Reencrypt
ed
password store using new GPG id
${
id_print
%,
}
."
git_add_file
"
$PREFIX
/
$id_path
"
"Reencrypt password store using new GPG id
${
id_print
%,
}
."
}
}
cmd_show
()
{
cmd_show
()
{
...
@@ -415,7 +415,7 @@ cmd_insert() {
...
@@ -415,7 +415,7 @@ cmd_insert() {
read
-r
-p
"Enter password for
$path
: "
-e
password
read
-r
-p
"Enter password for
$path
: "
-e
password
gpg
-e
"
${
GPG_RECIPIENT_ARGS
[@]
}
"
-o
"
$passfile
"
$GPG_OPTS
<<<
"
$password
"
gpg
-e
"
${
GPG_RECIPIENT_ARGS
[@]
}
"
-o
"
$passfile
"
$GPG_OPTS
<<<
"
$password
"
fi
fi
git_add_file
"
$passfile
"
"Add
ed
given password for
$path
to store."
git_add_file
"
$passfile
"
"Add given password for
$path
to store."
}
}
cmd_edit
()
{
cmd_edit
()
{
...
@@ -436,10 +436,10 @@ cmd_edit() {
...
@@ -436,10 +436,10 @@ cmd_edit() {
tmpdir
#Defines $SECURE_TMPDIR
tmpdir
#Defines $SECURE_TMPDIR
local
tmp_file
=
"
$(
TMPDIR
=
"
$SECURE_TMPDIR
"
mktemp
-t
"
$template
"
)
"
local
tmp_file
=
"
$(
TMPDIR
=
"
$SECURE_TMPDIR
"
mktemp
-t
"
$template
"
)
"
local
action
=
"Add
ed
"
local
action
=
"Add"
if
[[
-f
$passfile
]]
;
then
if
[[
-f
$passfile
]]
;
then
gpg
-d
-o
"
$tmp_file
"
$GPG_OPTS
"
$passfile
"
||
exit
1
gpg
-d
-o
"
$tmp_file
"
$GPG_OPTS
"
$passfile
"
||
exit
1
action
=
"Edit
ed
"
action
=
"Edit"
fi
fi
${
EDITOR
:-
vi
}
"
$tmp_file
"
${
EDITOR
:-
vi
}
"
$tmp_file
"
while
!
gpg
-e
"
${
GPG_RECIPIENT_ARGS
[@]
}
"
-o
"
$passfile
"
$GPG_OPTS
"
$tmp_file
"
;
do
while
!
gpg
-e
"
${
GPG_RECIPIENT_ARGS
[@]
}
"
-o
"
$passfile
"
$GPG_OPTS
"
$tmp_file
"
;
do
...
@@ -481,7 +481,7 @@ cmd_generate() {
...
@@ -481,7 +481,7 @@ cmd_generate() {
local
pass
=
"
$(
pwgen
-s
$symbols
$length
1
)
"
local
pass
=
"
$(
pwgen
-s
$symbols
$length
1
)
"
[[
-n
$pass
]]
||
exit
1
[[
-n
$pass
]]
||
exit
1
gpg
-e
"
${
GPG_RECIPIENT_ARGS
[@]
}
"
-o
"
$passfile
"
$GPG_OPTS
<<<
"
$pass
"
gpg
-e
"
${
GPG_RECIPIENT_ARGS
[@]
}
"
-o
"
$passfile
"
$GPG_OPTS
<<<
"
$pass
"
git_add_file
"
$passfile
"
"Add
ed
generated password for
$path
to store."
git_add_file
"
$passfile
"
"Add generated password for
$path
to store."
if
[[
$clip
-eq
0
]]
;
then
if
[[
$clip
-eq
0
]]
;
then
echo
"The generated password to
$path
is:"
echo
"The generated password to
$path
is:"
...
@@ -522,7 +522,7 @@ cmd_delete() {
...
@@ -522,7 +522,7 @@ cmd_delete() {
rm
$recursive
-f
-v
"
$passfile
"
rm
$recursive
-f
-v
"
$passfile
"
if
[[
-d
$GIT_DIR
&&
!
-e
$passfile
]]
;
then
if
[[
-d
$GIT_DIR
&&
!
-e
$passfile
]]
;
then
git
rm
-qr
"
$passfile
"
git
rm
-qr
"
$passfile
"
git_commit
"Remove
d
$path
from store."
git_commit
"Remove
$path
from store."
fi
fi
rmdir
-p
"
${
passfile
%/*
}
"
2>/dev/null
rmdir
-p
"
${
passfile
%/*
}
"
2>/dev/null
}
}
...
@@ -568,20 +568,20 @@ cmd_copy_move() {
...
@@ -568,20 +568,20 @@ cmd_copy_move() {
if
[[
-d
$GIT_DIR
&&
!
-e
$old_path
]]
;
then
if
[[
-d
$GIT_DIR
&&
!
-e
$old_path
]]
;
then
git
rm
-qr
"
$old_path
"
git
rm
-qr
"
$old_path
"
git_add_file
"
$new_path
"
"Rename
d
${
1
}
to
${
2
}
."
git_add_file
"
$new_path
"
"Rename
${
1
}
to
${
2
}
."
fi
fi
rmdir
-p
"
$old_dir
"
2>/dev/null
rmdir
-p
"
$old_dir
"
2>/dev/null
else
else
cp
$interactive
-r
-v
"
$old_path
"
"
$new_path
"
||
exit
1
cp
$interactive
-r
-v
"
$old_path
"
"
$new_path
"
||
exit
1
[[
-e
"
$new_path
"
]]
&&
reencrypt_path
"
$new_path
"
[[
-e
"
$new_path
"
]]
&&
reencrypt_path
"
$new_path
"
git_add_file
"
$new_path
"
"Cop
ied
${
1
}
to
${
2
}
."
git_add_file
"
$new_path
"
"Cop
y
${
1
}
to
${
2
}
."
fi
fi
}
}
cmd_git
()
{
cmd_git
()
{
if
[[
$1
==
"init"
]]
;
then
if
[[
$1
==
"init"
]]
;
then
git
"
$@
"
||
exit
1
git
"
$@
"
||
exit
1
git_add_file
"
$PREFIX
"
"Add
ed
current contents of password store."
git_add_file
"
$PREFIX
"
"Add current contents of password store."
elif
[[
-d
$GIT_DIR
]]
;
then
elif
[[
-d
$GIT_DIR
]]
;
then
exec
git
"
$@
"
exec
git
"
$@
"
else
else
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment