-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #191 from mattmc3/v1.9.7
antidote version 1.9.7
- Loading branch information
Showing
125 changed files
with
1,129 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
*.zwc | ||
*.zwc.old | ||
.cache/ | ||
!/tests/**/.cache/ | ||
.tmp/ | ||
.plugins/ | ||
.todo/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/zsh | ||
# Call me paranoid, but I want to be really certain antidote will never rm something it | ||
# shouldn't. This function wraps rm to double check that any paths being removed are | ||
# valid. If it's not in your $HOME or $TMPDIR, we need to block it. | ||
|
||
#function __antidote_del { | ||
emulate -L zsh; setopt local_options | ||
|
||
local -a rmflags rmpaths | ||
local p | ||
|
||
while (( $# )); do | ||
case "$1" in | ||
--) shift; break ;; | ||
-*) rmflags+=($1) ;; | ||
*) break ;; | ||
esac | ||
shift | ||
done | ||
|
||
(( $# > 0 )) || return 1 | ||
|
||
for p in $@; do | ||
p="${p:a}" | ||
if [[ "$p" != $HOME/* ]] && [[ "$p" != ${TMPDIR:-/tmp}/* ]]; then | ||
print -ru2 -- "antidote: Blocked attempt to rm path: '$p'." | ||
return 1 | ||
fi | ||
done | ||
|
||
command rm ${rmflags[@]} -- "$@" | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/zsh | ||
### Pretty print a path | ||
|
||
if zstyle -t ':antidote:compatibility-mode' 'antibody'; then | ||
echo "$1" | ||
else | ||
echo "$1" | sed -e "s|^$HOME/|\$HOME/|" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.