Code Review
/
common
/
bash_it.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
e964c02
)
Add simple password generator
author
Mark Szymanski
<mrman208@me.com>
Wed, 10 Aug 2011 23:49:20 +0000
(18:49 -0500)
committer
Mark Szymanski
<mrman208@me.com>
Wed, 10 Aug 2011 23:49:20 +0000
(18:49 -0500)
plugins/available/base.plugin.bash
patch
|
blob
|
history
diff --git
a/plugins/available/base.plugin.bash
b/plugins/available/base.plugin.bash
index
e361e04
..
cccd956
100644
(file)
--- a/
plugins/available/base.plugin.bash
+++ b/
plugins/available/base.plugin.bash
@@
-15,6
+15,18
@@
function myip {
echo "Your public IP is: ${bold_green} $res ${normal}"
}
+pass() {
+ if [ -z "$(which gshuf)" ]
+ then
+ echo "Error: shuf isn't installed!"
+ return 1
+ fi
+
+ pass=$(shuf -n4 /usr/share/dict/words | tr '\n' ' ')
+ echo "With spaces (easier to memorize): $pass"
+ echo "Without (use this as the pass): $(echo $pass | tr -d ' ')"
+}
+
# Function for previewing markdown files in the browser
function pmdown() {