mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 18:04:55 +01:00
parent
b246584a02
commit
acd7ad9190
@ -285,6 +285,7 @@ func ShowRemotes() {
|
|||||||
func ChooseRemote() string {
|
func ChooseRemote() string {
|
||||||
remotes := LoadedData().GetSectionList()
|
remotes := LoadedData().GetSectionList()
|
||||||
sort.Strings(remotes)
|
sort.Strings(remotes)
|
||||||
|
fmt.Println("Select remote.")
|
||||||
return Choose("remote", "value", remotes, nil, "", true, false)
|
return Choose("remote", "value", remotes, nil, "", true, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,8 +332,10 @@ func ShowRemote(name string) {
|
|||||||
|
|
||||||
// OkRemote prints the contents of the remote and ask if it is OK
|
// OkRemote prints the contents of the remote and ask if it is OK
|
||||||
func OkRemote(name string) bool {
|
func OkRemote(name string) bool {
|
||||||
fmt.Printf("Configuration of %q remote:\n", name)
|
fmt.Println("Configuration complete.")
|
||||||
|
fmt.Println("Options:")
|
||||||
listRemoteOptions(name)
|
listRemoteOptions(name)
|
||||||
|
fmt.Printf("Keep this %q remote?\n", name)
|
||||||
switch i := CommandDefault([]string{"yYes this is OK", "eEdit this remote", "dDelete this remote"}, 0); i {
|
switch i := CommandDefault([]string{"yYes this is OK", "eEdit this remote", "dDelete this remote"}, 0); i {
|
||||||
case 'y':
|
case 'y':
|
||||||
return true
|
return true
|
||||||
@ -492,6 +495,7 @@ func ChooseOption(o *fs.Option, name string) string {
|
|||||||
// NewRemoteName asks the user for a name for a new remote
|
// NewRemoteName asks the user for a name for a new remote
|
||||||
func NewRemoteName() (name string) {
|
func NewRemoteName() (name string) {
|
||||||
for {
|
for {
|
||||||
|
fmt.Println("Enter name for new remote.")
|
||||||
fmt.Printf("name> ")
|
fmt.Printf("name> ")
|
||||||
name = ReadLine()
|
name = ReadLine()
|
||||||
if LoadedData().HasSection(name) {
|
if LoadedData().HasSection(name) {
|
||||||
@ -548,7 +552,7 @@ func NewRemote(ctx context.Context, name string) error {
|
|||||||
|
|
||||||
// EditRemote gets the user to edit a remote
|
// EditRemote gets the user to edit a remote
|
||||||
func EditRemote(ctx context.Context, ri *fs.RegInfo, name string) error {
|
func EditRemote(ctx context.Context, ri *fs.RegInfo, name string) error {
|
||||||
fmt.Printf("Edit existing %q remote with options:\n", name)
|
fmt.Printf("Editing existing %q remote with options:\n", name)
|
||||||
listRemoteOptions(name)
|
listRemoteOptions(name)
|
||||||
newSection()
|
newSection()
|
||||||
for {
|
for {
|
||||||
|
Loading…
Reference in New Issue
Block a user