mirror of https://github.com/sobolevn/git-secret
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
544 B
Bash
32 lines
544 B
Bash
#!/usr/bin/env bash
|
|
|
|
|
|
function list {
|
|
OPTIND=1
|
|
|
|
while getopts 'h' opt; do
|
|
case "$opt" in
|
|
h) _show_manual_for 'list';;
|
|
|
|
*) _invalid_option_for 'list';;
|
|
esac
|
|
done
|
|
|
|
shift $((OPTIND-1))
|
|
[ "$1" = '--' ] && shift
|
|
|
|
if [ $# -ne 0 ]; then
|
|
_abort "list does not understand params: $*"
|
|
fi
|
|
|
|
_user_required
|
|
|
|
# Command logic:
|
|
filenames=()
|
|
_list_all_added_files # exports 'filenames' array
|
|
local filename
|
|
for filename in "${filenames[@]}"; do
|
|
echo "$filename" # do not prepend 'git-secret: '
|
|
done
|
|
}
|