Skip to content

Commit

Permalink
Merge pull request #27 from jamesob/allow_func_spaces
Browse files Browse the repository at this point in the history
Allow spaces between function names and parens
  • Loading branch information
jamesob committed Nov 3, 2015
2 parents 5501e7a + 4d852c3 commit 7970ae7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions desk
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ cmd_current() {
# Last clause in the grep regexp accounts for fish functions.
local DOCLINE=$(
grep -B 1 -E \
"^(alias ${NAME}=|(function )?${NAME}\()|function $NAME" "$DESKPATH" \
"^(alias ${NAME}=|(function )?${NAME}( )?\()|function $NAME" "$DESKPATH" \
| grep "#")

if [ -z "$DOCLINE" ]; then
Expand All @@ -158,9 +158,9 @@ echo_description() {
# Echo a list of aliases and functions for a given desk
get_callables() {
local DESKPATH=$1
grep -E "^(alias |(function )?${FNAME_CHARS}+\()|function $NAME" "$DESKPATH" \
grep -E "^(alias |(function )?${FNAME_CHARS}+ ?\()|function $NAME" "$DESKPATH" \
| sed 's/alias \([^= ]*\)=.*/\1/' \
| sed -E "s/(function )?(${FNAME_CHARS}+)\(\).*/\2/" \
| sed -E "s/(function )?(${FNAME_CHARS}+) ?\(\).*/\2/" \
| sed -E "s/function (${FNAME_CHARS}+).*/\1/"
}

Expand Down
4 changes: 2 additions & 2 deletions examples/terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ plan() {
}

# Run `terraform apply` with proper AWS var config
apply() {
apply () {
terraform apply \
-var "access_key=${AWS_ACCESS_KEY_ID}" \
-var "secret_key=${AWS_SECRET_ACCESS_KEY}"
}

# Set up terraform config: <config_key>
config() {
config () {
local KEY=$1
terraform remote config -backend=s3 \
-backend-config="bucket=some.bucket.secrets.terraform" \
Expand Down

0 comments on commit 7970ae7

Please sign in to comment.