From 8e9b320e9e5d8a657f12b5258665eed0f5047855 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 11 Dec 2015 14:30:59 +1300 Subject: Add more detail on bashkeep usage --- bash/bashrc.d/keep.bash | 31 +++++++++++++++++++++++++------ 1 file 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() { -- cgit v1.2.3