Remove function keyword from bash fn defns

To keep things standardized between functions.zsh and
dumping_grounds.zsh.
This commit is contained in:
William Carroll 2019-03-04 17:53:16 +00:00
parent 9da958d920
commit cb533533c1

View file

@ -1,14 +1,15 @@
# From Google's ZSH Hacks # From Google's ZSH Hacks
# NOTE: this file has since been modified by me.
# Improvement to fasd's existing `zz` alias # Improvement to fasd's existing `zz` alias
unalias zz unalias zz
function zz() { zz() {
# TODO: Add documentation # TODO: Add documentation
local dir local dir
dir="$(fasd -Rdl "$1" | fzf --query="$1" -1 -0 --no-sort +m)" && cd "${dir}" || return 1 dir="$(fasd -Rdl "$1" | fzf --query="$1" -1 -0 --no-sort +m)" && cd "${dir}" || return 1
} }
function fv() { fv() {
# Usage: fv file pattern # Usage: fv file pattern
# This is useful when you know the fuzzy name of the file you want to edit # This is useful when you know the fuzzy name of the file you want to edit
local file local file
@ -16,7 +17,7 @@ function fv() {
[[ -n "$file" ]] && vim "$file" [[ -n "$file" ]] && vim "$file"
} }
function bb() { tb() {
# Toggle between blaze-bin and your source. # Toggle between blaze-bin and your source.
# Useful if you like to cd into the dir where your source lives. # Useful if you like to cd into the dir where your source lives.
if [[ $PWD =~ '(.*)/blaze-bin(.*)' ]]; then if [[ $PWD =~ '(.*)/blaze-bin(.*)' ]]; then
@ -26,7 +27,7 @@ function bb() {
fi fi
} }
function jt() { tj() {
# Toggle between the source dir and test dir. # Toggle between the source dir and test dir.
if [[ $PWD =~ '(.*)/javatests(.*)' ]]; then if [[ $PWD =~ '(.*)/javatests(.*)' ]]; then
cd "${match[1]}/java${match[2]}" cd "${match[1]}/java${match[2]}"