Skip to content

Commit

Permalink
feat(init): remove deprecated temp files
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Apr 7, 2020
1 parent 6cc58d3 commit af1e348
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions zsh-abbr.zsh
Expand Up @@ -844,6 +844,27 @@ _zsh_abbr_init() {

touch ${TMPDIR:-/tmp/}zsh-abbr/global-user-abbreviations
chmod 600 ${TMPDIR:-/tmp/}zsh-abbr/global-user-abbreviations

# clean up deprecated temp files
if [ -d ${TMPDIR:-/tmp/}zsh-abbr-jobs ]; then
rm -rf ${TMPDIR:-/tmp/}zsh-abbr-jobs 2> /dev/null
fi

if [ -f ${TMPDIR:-/tmp/}zsh-user-global-abbreviations ]; then
rm ${TMPDIR:-/tmp/}zsh-user-global-abbreviations 2> /dev/null
fi

if [ -f ${TMPDIR:-/tmp/}zsh-user-abbreviations ]; then
rm ${TMPDIR:-/tmp/}zsh-user-abbreviations 2> /dev/null
fi

if [ -f ${TMPDIR:-/tmp/}zsh-abbr-initializing ]; then
rm ${TMPDIR:-/tmp/}zsh-abbr-initializing
fi

if [ -f ${TMPDIR:-/tmp/}abbr_universals ]; then
rm ${TMPDIR:-/tmp/}abbr_universals
fi
}

function _zsh_abbr_init:seed() {
Expand Down

0 comments on commit af1e348

Please sign in to comment.