aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-12-11 14:30:59 +1300
committerTom Ryder <tom@sanctum.geek.nz>2015-12-11 14:30:59 +1300
commit8e9b320e9e5d8a657f12b5258665eed0f5047855 (patch)
tree1387d79a3a3227d33235cfb0780cdf41636a81d6 /bash
parentWhoops, dropped an important character (diff)
downloaddotfiles-8e9b320e9e5d8a657f12b5258665eed0f5047855.tar.gz
dotfiles-8e9b320e9e5d8a657f12b5258665eed0f5047855.zip
Add more detail on bashkeep usage
Diffstat (limited to 'bash')
-rw-r--r--bash/bashrc.d/keep.bash31
1 files changed, 25 insertions, 6 deletions
diff --git a/bash/bashrc.d/keep.bash b/bash/bashrc.d/keep.bash
index 1b2fd9b7..5e99df2e 100644
--- a/bash/bashrc.d/keep.bash
+++ b/bash/bashrc.d/keep.bash
@@ -1,10 +1,29 @@
#
-# Main function for bashkeep; provided with a list of NAMEs, whether shell
-# functions or variables, writes the current definition of each NAME to a
-# directory $BASHKEEP (defaults to ~/.bashkeep.d) with a .bash suffix, each
-# of which is reloaded each time this file is called. This allows you to
-# quickly arrange to keep that useful shell function or variable you made
-# inline on subsequent logins.
+# keep -- Main function for bashkeep; provided with a list of NAMEs, whether
+# shell functions or variables, writes the current definition of each NAME to a
+# directory $BASHKEEP (defaults to ~/.bashkeep.d) with a .bash suffix, each of
+# which is reloaded each time this file is called. This allows you to quickly
+# arrange to keep that useful shell function or variable you made inline on
+# subsequent logins.
+#
+# Consider a shell function declared inline with the NAME 'ayy':
+#
+# $ ayy() { printf '%s\n' lmao ; }
+# $ ayy
+# lmao
+# $ keep ayy
+# $ keep
+# ayy
+# $ exit
+#
+# Then, on next login, the function is redefined for you:
+#
+# $ ayy
+# lmao
+#
+# To get rid of it:
+#
+# $ keep -d ayy
#
keep() {