aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/ftp.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-06-06 14:54:33 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-06-06 14:54:33 +1200
commitfdfe1fe72f8fe358d2b64ddc9e1b58dda4d3ba90 (patch)
tree75374be5bee4e0f36f3020958fb99e8fb46e4385 /bash/bashrc.d/ftp.bash
parentAvoid command substitution inline declaration (diff)
downloaddotfiles-fdfe1fe72f8fe358d2b64ddc9e1b58dda4d3ba90.tar.gz
dotfiles-fdfe1fe72f8fe358d2b64ddc9e1b58dda4d3ba90.zip
Separate declaration from assignment
Diffstat (limited to 'bash/bashrc.d/ftp.bash')
-rw-r--r--bash/bashrc.d/ftp.bash8
1 files changed, 5 insertions, 3 deletions
diff --git a/bash/bashrc.d/ftp.bash b/bash/bashrc.d/ftp.bash
index 85130d7a..b57f307a 100644
--- a/bash/bashrc.d/ftp.bash
+++ b/bash/bashrc.d/ftp.bash
@@ -1,9 +1,11 @@
# Completion for ftp with .netrc machines
_ftp() {
- local word=${COMP_WORDS[COMP_CWORD]}
+ local word
+ word=${COMP_WORDS[COMP_CWORD]}
# Bail if the .netrc file is illegible
- local netrc=$HOME/.netrc
+ local netrc
+ netrc=$HOME/.netrc
if [[ ! -r $netrc ]] ; then
return 1
fi
@@ -14,7 +16,7 @@ _ftp() {
# Iterate through tokens and collect machine names
local -a machines
- local -i machine=0
+ local -i machine
local token
for token in "${tokens[@]}" ; do
if ((machine)) ; then