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
gitwill help in the section where we add git support (not too important)
- A password generator
- Step 1:
echo "correcthorsebatterystaple" - Generate a random string
- The
generatecommand - The
versioncommand - The
helpcommand
- Storing plaintext passwords
- Save generated password to
$PREFIX - The
showcommand - Make
showthe default command - The
insertcommand - The
rmcommand - The
mvcommand - The
cpcommand
- Encryption
- The
initcommand - GPG options and whether to use
gpg2 gpg_winpath()for Cygwinset_gpg_recipients()- Encrypt with
generateandinsertcommands - Decrypt with
showcommand - Reencrypt using
initcommand
- Copy to clipboard
- Generic
clip() - Cygwin
clip() - macOS
clip() -coption forgenerateandshowcommands- 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/--clipswitch - More switches
- QR codes
- Generic
qrcode() - macOS
qrcode() -qoption forgenerateandshowcommands
- Secure text editing
- The
editcommand - Generic
tmpdir() - macOS
tmpdir() - FreeBSD
$SHRED - OpenBSD
tmpdir()
- Listing and searching
- The
lscommand - The
findcommand - The
grepcommand
- Git
- The
gitcommand set_git()git_add_file()git_commit()- Add git support to
generateandinsertcommands - Add git support to
edit,rm,mv,cpcommands
- Completion
bashcompletionzshcompletionfishcompletion
- Signing and verification
- Sign
.gpg_idininitcommand verify_file()- Sign git commits
- Multiple users
--pathoption forinitcommand
- User extensions
cmd_extension()- An example:
pass-update