mirror of https://github.com/sobolevn/git-secret
manuals finished, new help based on man, zsh plugin
parent
6278d2e597
commit
bf6fdac0b2
@ -0,0 +1,23 @@
|
||||
# Copyright 2016 Sobolev Nikita <mail@sobolevn.me>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Create binary:
|
||||
PLUGIN_DIR="$(dirname $0)"
|
||||
|
||||
if [ ! -f "$PLUGIN_DIR/git-secret" ]; then
|
||||
cd "$PLUGIN_DIR" && make build && cd ..
|
||||
fi
|
||||
|
||||
# Add our plugin's bin diretory to user's path
|
||||
export PATH="${PATH}:${PLUGIN_DIR}"
|
@ -0,0 +1,30 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-SECRET\-CLEAN" "1" "February 2016" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-secret\-clean\fR \- removes all the hidden files\.
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
.
|
||||
.nf
|
||||
|
||||
git secret clean [\-v]
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
\fBgit\-secret\-clean\fR deletes all the encrypted files\. This command can produce a verbose output, printing which files are deleted\.
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
.
|
||||
.nf
|
||||
|
||||
\-v \- shows which files are deleted\.
|
||||
\-h \- shows this help\.
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "SEE ALSO"
|
||||
git\-secret\-whoknows(1), git\-secret\-add(1), git\-secret\-remove(1), git\-secret\-hide(1), git\-secret\-reveal(1)
|
@ -0,0 +1,21 @@
|
||||
git-secret-clean - removes all the hidden files.
|
||||
================================================
|
||||
|
||||
## SYNOPSIS
|
||||
|
||||
git secret clean [-v]
|
||||
|
||||
|
||||
## DESCRIPTION
|
||||
`git-secret-clean` deletes all the encrypted files. This command can produce a verbose output, printing which files are deleted.
|
||||
|
||||
|
||||
## OPTIONS
|
||||
|
||||
-v - shows which files are deleted.
|
||||
-h - shows this help.
|
||||
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
git-secret-whoknows(1), git-secret-add(1), git-secret-remove(1), git-secret-hide(1), git-secret-reveal(1)
|
@ -0,0 +1,29 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-SECRET\-KILLPERSON" "1" "February 2016" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-secret\-killperson\fR \- deletes key identified by an email from the inner keyring\.
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
.
|
||||
.nf
|
||||
|
||||
git secret killperson [email]
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
\fBgit\-secret\-killperson\fR makes it impossible for given user to decrypt the hidden file in the future\. It is required to run \fBgit\-secret\-hide\fR once again with the updated keyring\.
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
.
|
||||
.nf
|
||||
|
||||
\-h \- shows this help\.
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "SEE ALSO"
|
||||
git\-secret\-tell(1), git\-secret\-hide(1), git\-secret\-reveal(1)
|
@ -0,0 +1,20 @@
|
||||
git-secret-killperson - deletes key identified by an email from the inner keyring.
|
||||
==================================================================================
|
||||
|
||||
## SYNOPSIS
|
||||
|
||||
git secret killperson [email]
|
||||
|
||||
|
||||
## DESCRIPTION
|
||||
`git-secret-killperson` makes it impossible for given user to decrypt the hidden file in the future. It is required to run `git-secret-hide` once again with the updated keyring.
|
||||
|
||||
|
||||
## OPTIONS
|
||||
|
||||
-h - shows this help.
|
||||
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
git-secret-tell(1), git-secret-hide(1), git-secret-reveal(1)
|
@ -0,0 +1,29 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-SECRET\-LIST" "1" "February 2016" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-secret\-list\fR \- prints all the added files\.
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
.
|
||||
.nf
|
||||
|
||||
git secret list
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
\fBgit\-secret\-list\fR prints all the currently added tracked files from the \fB\.gitsecret/paths/mapping\.cfg\fR\.
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
.
|
||||
.nf
|
||||
|
||||
\-h \- shows this help\.
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "SEE ALSO"
|
||||
git\-secret\-whoknows(1), git\-secret\-add(1), git\-secret\-remove(1), git\-secret\-hide(1), git\-secret\-reveal(1)
|
@ -0,0 +1,20 @@
|
||||
git-secret-list - prints all the added files.
|
||||
=============================================
|
||||
|
||||
## SYNOPSIS
|
||||
|
||||
git secret list
|
||||
|
||||
|
||||
## DESCRIPTION
|
||||
`git-secret-list` prints all the currently added tracked files from the `.gitsecret/paths/mapping.cfg`.
|
||||
|
||||
|
||||
## OPTIONS
|
||||
|
||||
-h - shows this help.
|
||||
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
git-secret-whoknows(1), git-secret-add(1), git-secret-remove(1), git-secret-hide(1), git-secret-reveal(1)
|
@ -0,0 +1,29 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-SECRET\-USAGE" "1" "February 2016" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-secret\-usage\fR \- prints all the available commands\.
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
.
|
||||
.nf
|
||||
|
||||
git secret usage
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
\fBgit\-secret\-usage\fR is used to print all the available commands\.
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
.
|
||||
.nf
|
||||
|
||||
\-h \- shows this help\.
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "SEE ALSO"
|
||||
git\-secret\-init(1), git\-secret\-add(1), git\-secret\-hide(1), git\-secret\-reveal(1)
|
@ -0,0 +1,20 @@
|
||||
git-secret-usage - prints all the available commands.
|
||||
=====================================================
|
||||
|
||||
## SYNOPSIS
|
||||
|
||||
git secret usage
|
||||
|
||||
|
||||
## DESCRIPTION
|
||||
`git-secret-usage` is used to print all the available commands.
|
||||
|
||||
|
||||
## OPTIONS
|
||||
|
||||
-h - shows this help.
|
||||
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
git-secret-init(1), git-secret-add(1), git-secret-hide(1), git-secret-reveal(1)
|
@ -0,0 +1,29 @@
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-SECRET\-WHOKNOWS" "1" "February 2016" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-secret\-whoknows\fR \- prints email\-labels for each key in the keyring\.
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
.
|
||||
.nf
|
||||
|
||||
git secret whoknows
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
\fBgit\-secret\-whokowns\fR prints list of email addresses which are used as labels for currently public keys added to the local keyring\.
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
.
|
||||
.nf
|
||||
|
||||
\-h \- shows this help\.
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.SH "SEE ALSO"
|
||||
git\-secret\-list(1), git\-secret\-add(1), git\-secret\-hide(1), git\-secret\-reveal(1)
|
@ -0,0 +1,20 @@
|
||||
git-secret-whoknows - prints email-labels for each key in the keyring.
|
||||
======================================================================
|
||||
|
||||
## SYNOPSIS
|
||||
|
||||
git secret whoknows
|
||||
|
||||
|
||||
## DESCRIPTION
|
||||
`git-secret-whokowns` prints list of email addresses which are used as labels for currently public keys added to the local keyring.
|
||||
|
||||
|
||||
## OPTIONS
|
||||
|
||||
-h - shows this help.
|
||||
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
git-secret-list(1), git-secret-add(1), git-secret-hide(1), git-secret-reveal(1)
|
@ -1,43 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
function _show_help_clean {
|
||||
cat <<-EOF
|
||||
usage: git secret clean [-v]
|
||||
removes all the hidden files.
|
||||
|
||||
options:
|
||||
-v shows which files are deleted.
|
||||
-h shows this help.
|
||||
|
||||
EOF
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
function clean {
|
||||
OPTIND=1
|
||||
|
||||
local verbose=""
|
||||
while getopts "vh" opt; do
|
||||
case "$opt" in
|
||||
v)
|
||||
verbose="v"
|
||||
;;
|
||||
v) verbose="v";;
|
||||
|
||||
h)
|
||||
_show_help_clean
|
||||
;;
|
||||
h) _show_manual_for "clean";;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $((OPTIND-1))
|
||||
[ "$1" = "--" ] && shift
|
||||
|
||||
[[ ! -z $verbose ]] && echo && echo "cleaing:" || : # bug with custom bash on OSX
|
||||
[[ ! -z "$verbose" ]] && echo && echo "cleaing:" || : # bug with custom bash on OSX
|
||||
|
||||
find . -name *$SECRETS_EXTENSION -type f | xargs rm -f$verbose
|
||||
|
||||
[[ ! -z $verbose ]] && echo || : # bug with custom bash on OSX
|
||||
[[ ! -z "$verbose" ]] && echo || : # bug with custom bash on OSX
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue