diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-21 23:56:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-21 23:56:03 +1200 |
commit | f9e350e135585e9df31c17a65364367601bbe1f5 (patch) | |
tree | 471bff90e99b06a13c15c6a328d57eeace0fbb1b /bash/bashrc.d/keep.bash | |
parent | Port Bash Git prompt changes to pdksh (diff) | |
parent | Remove double-up import of completions (diff) | |
download | dotfiles-f9e350e135585e9df31c17a65364367601bbe1f5.tar.gz dotfiles-f9e350e135585e9df31c17a65364367601bbe1f5.zip |
Merge branch 'master' into openbsd
Diffstat (limited to 'bash/bashrc.d/keep.bash')
-rw-r--r-- | bash/bashrc.d/keep.bash | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/bash/bashrc.d/keep.bash b/bash/bashrc.d/keep.bash index b1c8bea4..fb4b8bde 100644 --- a/bash/bashrc.d/keep.bash +++ b/bash/bashrc.d/keep.bash @@ -45,9 +45,7 @@ keep() { # -h given; means show help h) - while IFS= read -r line ; do - printf '%s\n' "$line" - done <<EOF + cat <<EOF $FUNCNAME: Keep variables and functions in shell permanently by writing them to named scripts iterated on shell start, in \$BASHKEEP (defaults to ~/.bashkeep.d). @@ -145,10 +143,7 @@ EOF } # Load any existing scripts in bashkeep -if [[ -d ${BASHKEEP:-"$HOME"/.bashkeep.d} ]] ; then - for bashkeep in "${BASHKEEP:-"$HOME"/.bashkeep.d}"/*.bash ; do - [[ -e $bashkeep ]] || continue - source "$bashkeep" - done - unset -v bashkeep -fi +for bashkeep in "${BASHKEEP:-"$HOME"/.bashkeep.d}"/*.bash ; do + [[ -e $bashkeep ]] && source "$bashkeep" +done +unset -v bashkeep |