Rename function pass to passgen. Define alias pass if pass command (password store) is not installed or BASH_IT_LEGACY_PASS is true.

This commit is contained in:
Sam Morrison
2015-01-19 12:15:26 +09:00
parent 8a12d12725
commit 5963249c0a

View File

@@ -39,7 +39,7 @@ function pickfrom ()
head -n $n $file | tail -1
}
function pass ()
function passgen ()
{
about 'generates random password from dictionary words'
param 'optional integer length'
@@ -53,6 +53,13 @@ function pass ()
echo "Without (use this as the pass): $(echo $pass | tr -d ' ')"
}
# Create alias pass to passgen when pass isn't installed or
# BASH_IT_LEGACY_PASS is true.
if ! command -v pass &>/dev/null || [ "$BASH_IT_LEGACY_PASS" == 1 ]
then
alias pass=passgen
fi
function pmdown ()
{
about 'preview markdown file in a browser'