diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-02-19 10:55:21 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-02-19 10:55:21 +1300 |
commit | ab4565974746d2d370e84468961fe125daf6a724 (patch) | |
tree | 8b673ecb07fefe16d13049c54a413b146c9fd7b2 /bash/bashrc.d | |
parent | Avoid ambiguous conditional syntax (diff) | |
download | dotfiles-ab4565974746d2d370e84468961fe125daf6a724.tar.gz dotfiles-ab4565974746d2d370e84468961fe125daf6a724.zip |
Don't break up short lines
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r-- | bash/bashrc.d/cd.bash | 3 | ||||
-rw-r--r-- | bash/bashrc.d/cf.bash | 12 |
2 files changed, 5 insertions, 10 deletions
diff --git a/bash/bashrc.d/cd.bash b/bash/bashrc.d/cd.bash index 26cffae0..16dbfc48 100644 --- a/bash/bashrc.d/cd.bash +++ b/bash/bashrc.d/cd.bash @@ -14,8 +14,7 @@ cd() { done if ((${#dirs[@]} == 2)) ; then if [[ $PWD == *"${dirs[0]}"* ]] ; then - builtin cd "${opts[@]}" \ - -- "${PWD/${dirs[0]}/${dirs[1]}}" + builtin cd "${opts[@]}" -- "${PWD/${dirs[0]}/${dirs[1]}}" else printf '%s\n' 'bash: cd: could not replace substring' >&2 return 1 diff --git a/bash/bashrc.d/cf.bash b/bash/bashrc.d/cf.bash index 715f0f5b..032ecc40 100644 --- a/bash/bashrc.d/cf.bash +++ b/bash/bashrc.d/cf.bash @@ -8,16 +8,13 @@ cf() { # Error conditions if [[ ! -e $dir ]] ; then - printf 'bash: cf: %s does not exist\n' \ - "$dir" >&2 + printf 'bash: cf: %s does not exist\n' "$dir" >&2 return 1 elif [[ ! -d $dir ]] ; then - printf 'bash: cf: %s is not a directory\n' \ - "$dir" >&2 + printf 'bash: cf: %s is not a directory\n' "$dir" >&2 return 1 elif [[ ! -r $dir ]] ; then - printf 'bash: cf: %s is not readable\n' \ - "$dir" >&2 + printf 'bash: cf: %s is not readable\n' "$dir" >&2 return 1 fi @@ -42,7 +39,6 @@ cf() { fi # Print result - printf '%d\t%s\n' \ - "${#files[@]}" "$dir" + printf '%d\t%s\n' "${#files[@]}" "$dir" } |