This is a (work-in-progress) tutorial that will teach you shell scripting by showing you how to build the pass password manager in small steps.
- Basic shell knowledge (
cd
,ls
) - Basic programming experience (variables, functions, conditionals, loops)
- Basic understanding of
git
will help in the section where we add git support (not too important)
- A password generator
- Step 1:
echo "correcthorsebatterystaple"
- Generate a random string
- The
generate
command - The
version
command - The
help
command
- Storing plaintext passwords
- Save generated password to
$PREFIX
- The
show
command - Make
show
the default command - The
insert
command - The
rm
command - The
mv
command - The
cp
command
- Encryption
- The
init
command - GPG options and whether to use
gpg2
gpg_winpath()
for Cygwinset_gpg_recipients()
- Encrypt with
generate
andinsert
commands - Decrypt with
show
command - Reencrypt using
init
command
- Copy to clipboard
- Generic
clip()
- Cygwin
clip()
- macOS
clip()
-c
option forgenerate
andshow
commands- Clear clipboard after 45 seconds
- Reset 45-second timer before starting a new one
- Restore previous clipboard contents
- Getopt
- Find GNU getopt for the platform
- Use it for
-c/--clip
switch - More switches
- QR codes
- Generic
qrcode()
- macOS
qrcode()
-q
option forgenerate
andshow
commands
- Secure text editing
- The
edit
command - Generic
tmpdir()
- macOS
tmpdir()
- FreeBSD
$SHRED
- OpenBSD
tmpdir()
- Listing and searching
- The
ls
command - The
find
command - The
grep
command
- Git
- The
git
command set_git()
git_add_file()
git_commit()
- Add git support to
generate
andinsert
commands - Add git support to
edit
,rm
,mv
,cp
commands
- Completion
bash
completionzsh
completionfish
completion
- Signing and verification
- Sign
.gpg_id
ininit
command verify_file()
- Sign git commits
- Multiple users
--path
option forinit
command
- User extensions
cmd_extension()
- An example:
pass-update