bin/ -> scripts/

This commit is contained in:
Henrik Lissner 2015-11-20 04:54:30 -05:00
parent c47ffb218e
commit 5cc46a4f22
14 changed files with 29 additions and 27 deletions

28
scripts/org-clean Executable file
View file

@ -0,0 +1,28 @@
#!/bin/sh
## Location where org-mode stores attachments
ORG_DIR="$HOME/Dropbox/org/"
DATA_DIR="$ORG_DIR/.attach";
echo "The following files appear orphaned:";
files=$(find "$DATA_DIR" -type f|perl -ne 'print "$1\n" if /([^\/]*)\/[^\/]*$/'|uniq|while read id; do grep -qiR --include "*.org" "$id" "$ORG_DIR" || find "$DATA_DIR" -ipath "*$id*" -type f; done)
echo "$files"
if [ "" == "$files" ]; then
echo "Nothing to do!"
exit
fi
echo "Delete? y/[n]"
read delete
case $delete in
y)
echo "$files" | while read fn; do rm "$fn"; done
echo "Done."
;;
*)
echo "Not deleting anything!"
;;
esac

View file

View file

@ -1,13 +0,0 @@
#compdef lsarchive
#autoload
#
# Completes lsarchive.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_arguments \
'(-v --verbose)'{-v,--remove}'[verbose archive listing]' \
"*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z)(-.)'" && return 0

View file

@ -1,13 +0,0 @@
#compdef unarchive
#autoload
#
# Completes unarchive.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_arguments \
'(-r --remove)'{-r,--remove}'[remove archive]' \
"*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z|deb)(-.)'" && return 0

2
zshrc
View file

@ -40,7 +40,7 @@ export ANDROID_SDK=/usr/local/Cellar/android-sdk/24.2
# export PATH=/usr/local/texlive/2015basic/bin/x86_64-darwin:$PATH
path=(
$HOME/.dotfiles/bin
$HOME/.dotfiles/scripts
$HOME/.{rb,py}env/bin
$GOPATH/bin
$ANDROID_HOME/platform-tools