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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user