diff --git a/zsh/functions/_brew b/zsh/completion/_brew similarity index 100% rename from zsh/functions/_brew rename to zsh/completion/_brew diff --git a/zsh/completion/_c b/zsh/completion/_c new file mode 100644 index 0000000..7753e9a --- /dev/null +++ b/zsh/completion/_c @@ -0,0 +1,3 @@ +#compdef c + +_files -W $PROJECTS -/ diff --git a/zsh/functions/_h b/zsh/completion/_h similarity index 96% rename from zsh/functions/_h rename to zsh/completion/_h index 725dc0a..f12fba8 100644 --- a/zsh/functions/_h +++ b/zsh/completion/_h @@ -1,2 +1,3 @@ #compdef h + _files -W ~ -/ diff --git a/zsh/functions/_rake b/zsh/completion/_rake similarity index 99% rename from zsh/functions/_rake rename to zsh/completion/_rake index b448eda..64b8848 100644 --- a/zsh/functions/_rake +++ b/zsh/completion/_rake @@ -1,4 +1,5 @@ #compdef rake + if [ -f Rakefile ]; then recent=`last_modified .rake_tasks~ Rakefile **/*.rake` if [[ $recent != '.rake_tasks~' ]]; then diff --git a/zsh/functions/verbose_completion b/zsh/completion/verbose_completion similarity index 100% rename from zsh/functions/verbose_completion rename to zsh/completion/verbose_completion diff --git a/zsh/functions/_c b/zsh/functions/_c deleted file mode 100644 index dc883c7..0000000 --- a/zsh/functions/_c +++ /dev/null @@ -1,2 +0,0 @@ -#compdef c -_files -W $PROJECTS -/ \ No newline at end of file diff --git a/zsh/functions/dock-delay b/zsh/functions/dock-delay deleted file mode 100644 index f7701b1..0000000 --- a/zsh/functions/dock-delay +++ /dev/null @@ -1 +0,0 @@ -defaults write com.apple.Dock autohide-delay -float $1 && killall Dock diff --git a/zsh/functions/extract b/zsh/functions/extract index 3acfb6d..38af663 100644 --- a/zsh/functions/extract +++ b/zsh/functions/extract @@ -2,6 +2,7 @@ # Usage: smartextract # Description: extracts archived files / mounts disk images # Note: .dmg/hdiutil is Mac OS X-specific. + extract () { if [ -f $1 ]; then case $1 in diff --git a/zsh/functions/show-colors b/zsh/functions/show-colors deleted file mode 100644 index 9768678..0000000 --- a/zsh/functions/show-colors +++ /dev/null @@ -1 +0,0 @@ -for code in {000..255}; do print -P -- "$code: %F{$code}Lorem ipsum dolor sit amet%f"; done diff --git a/zsh/chmod_help.zsh b/zsh/support/chmod_help.zsh similarity index 94% rename from zsh/chmod_help.zsh rename to zsh/support/chmod_help.zsh index 42f3fd2..6537c3f 100644 --- a/zsh/chmod_help.zsh +++ b/zsh/support/chmod_help.zsh @@ -1,7 +1,8 @@ # I'm just unable to remember this shit # Taken from http://www.analysisandsolutions.com/code/chmod.htm -alias chmod-help='echo "\ +chmod-help () { + echo "\ +---+-----+-------------------------+ | 0 | --- | no access | | 1 | --x | only execute | @@ -12,4 +13,5 @@ alias chmod-help='echo "\ | 6 | rw- | read and write | | 7 | rwx | read, write and execute | +---+-----+-------------------------+\ -"' +" +} diff --git a/zsh/support/dock_delay.zsh b/zsh/support/dock_delay.zsh new file mode 100644 index 0000000..d18e4f3 --- /dev/null +++ b/zsh/support/dock_delay.zsh @@ -0,0 +1,3 @@ +dock-delay() { + defaults write com.apple.Dock autohide-delay -float $1 && killall Dock +} diff --git a/zsh/support/show_colors.zsh b/zsh/support/show_colors.zsh new file mode 100644 index 0000000..2cab830 --- /dev/null +++ b/zsh/support/show_colors.zsh @@ -0,0 +1,3 @@ +show-colors() { + for code in {000..255}; do print -P -- "$code: %F{$code}Lorem ipsum dolor sit amet%f"; done +}