Rename function pass to passgen. Define alias pass if pass command (password store) is not installed or BASH_IT_LEGACY_PASS is true.
parent
8a12d12725
commit
5963249c0a
|
|
@ -39,7 +39,7 @@ function pickfrom ()
|
||||||
head -n $n $file | tail -1
|
head -n $n $file | tail -1
|
||||||
}
|
}
|
||||||
|
|
||||||
function pass ()
|
function passgen ()
|
||||||
{
|
{
|
||||||
about 'generates random password from dictionary words'
|
about 'generates random password from dictionary words'
|
||||||
param 'optional integer length'
|
param 'optional integer length'
|
||||||
|
|
@ -53,6 +53,13 @@ function pass ()
|
||||||
echo "Without (use this as the pass): $(echo $pass | tr -d ' ')"
|
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 ()
|
function pmdown ()
|
||||||
{
|
{
|
||||||
about 'preview markdown file in a browser'
|
about 'preview markdown file in a browser'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue