Browse Source

remove interactive prompt for -p, add separate option -P for that.

feature/debug
René Moser 11 years ago
parent
commit
e09d65a170
  1. 6
      README.md
  2. 8
      git-ftp
  3. 5
      man/git-ftp.1.md

6
README.md

@ -46,16 +46,16 @@ $ cd my_git_tracked_project
$ git ftp push --user <user> --passwd <password> ftp://host.example.com/public_html
```
For interactive password prompt use:
For interactive password prompt use `-P`:
``` sh
$ git ftp push -u <user> -p - ftp://host.example.com/public_html
$ git ftp push -u <user> -P ftp://host.example.com/public_html
```
Pushing for the first time:
``` sh
$ git ftp init -u <user> -p - ftp://host.example.com/public_html
$ git ftp init -u <user> -P ftp://host.example.com/public_html
```
See [man page](man/git-ftp.1.md) for more options, features and examples!

8
git-ftp

@ -149,6 +149,7 @@ OPTIONS
-h, --help Shows this help screen.
-u, --user FTP login name.
-p, --passwd FTP password.
-P, --ask-passwd Ask for FTP password interactively.
-k, --keychain FTP password from KeyChain (Mac OS X only).
-s, --scope Using a scope (e.g. dev, production, testing).
-D, --dry-run Dry run: Does not upload anything.
@ -1210,18 +1211,21 @@ do
REMOTE_PASSWD=$(expr "z$1" : 'z-[^=]*=\(.*\)')
;;
1,*)
ask_for_passwd
print_error_and_die "Too few arguments for option -p." "$ERROR_MISSING_ARGUMENTS"
;;
*)
if ! echo "$2" | egrep -q '^-'; then
REMOTE_PASSWD="$2"
else
ask_for_passwd
print_error_and_die "Too few arguments for option -p." "$ERROR_MISSING_ARGUMENTS"
fi
shift
;;
esac
;;
-P|--ask-passwd)
ask_for_passwd
;;
-k|--keychain*)
USE_KEYCHAIN=1
write_log "Enabled keychain."

5
man/git-ftp.1.md

@ -54,7 +54,10 @@ Another advantage is Git-ftp only handles files which are tracked with [Git].
: FTP login name. If no argument is given, local user will be taken.
`-p [password]`, `--passwd [password]`
: FTP password. If no argument is given, a password prompt will be shown.
: FTP password. See `-P` for interactive passwort prompt.
`-P`, `--ask-passwd`
: Ask for FTP password interactively.
`-k [[user]@[account]]`, `--keychain [[user]@[account]]`
: FTP password from KeyChain (Mac OS X only).

Loading…
Cancel
Save