-
Notifications
You must be signed in to change notification settings - Fork 8
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 #8 from MikeDacre/dev
Add ZSH specific stuff
- Loading branch information
Showing
4 changed files
with
101 additions
and
35 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
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
####################################################################### | ||
# careful_rm for ZSH # | ||
# Has some extra goodies # | ||
####################################################################### | ||
|
||
# Get the alias | ||
OURDIR="$(dirname $0:A)" | ||
source "${OURDIR}/careful_rm.alias.sh" | ||
|
||
# Make a trash aliase that changes with directory | ||
chpwd_trash() { | ||
if [ -x "${CAREFUL_RM}" ]; then | ||
TRASH=$(python ${CAREFUL_RM} --get-trash) | ||
if [[ "$OSTYPE" == "linux-gnu" ]]; then | ||
TRASH="${TRASH}/files" | ||
fi | ||
hash -d trash="${TRASH}" | ||
fi | ||
} | ||
chpwd_functions=( ${chpwd_functions} chpwd_trash ) | ||
chpwd_trash | ||
alias trsh="cd \${TRASH}" |
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