Skip to content

Commit

Permalink
Fixed small formatting bugs
Browse files Browse the repository at this point in the history
Signed-off-by: domhauton <[email protected]>
  • Loading branch information
domhauton committed Apr 24, 2017
1 parent 4aecdb6 commit e657dc9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion bin/autocomplete
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _membrane()
#
# The basic options we'll complete.
#
opts="status tracked-folders tracked-files watch-add watch-list watch-remove file-recover"
opts="status files peers history recover storage network contracts monitored-folders monitored-files watch-add watching watch-remove"

COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
return 0
Expand Down
Binary file modified bin/membrane
Binary file not shown.
4 changes: 2 additions & 2 deletions src/domhauton.com/membranecli/commands/helpCommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
const Version = "1.0.0-alpha.4"

func PrintHelp() {
available_commands := []string{DAEMON_STATUS, ALL_FILES, SHOW_PEERS, FILE_HISTORY, STORAGE_STATUS, NETWORK_STATUS, CONTRACT_STATUS, TRACKED_FOLDERS, TRACKED_FILES, WATCH_ADD, WATCH_LIST, WATCH_REMOVE, "file-recover"}
available_commands := []string{DAEMON_STATUS, ALL_FILES, SHOW_PEERS, FILE_HISTORY, FILE_RECOVER, STORAGE_STATUS, NETWORK_STATUS, CONTRACT_STATUS, TRACKED_FOLDERS, TRACKED_FILES, WATCH_ADD, WATCH_LIST, WATCH_REMOVE}
fmt.Printf(`Usage: membrane <command>
where <command> is one of: [%s]
Expand All @@ -20,5 +20,5 @@ Options:
}

func NoArgs() {
fmt.Printf("Membrane CLI version %s\nUse flag '-h' for more options", Version)
fmt.Printf("Membrane CLI version %s\nUse flag '-h' for more options\n", Version)
}
22 changes: 11 additions & 11 deletions src/domhauton.com/membranecli/commands/membranedCalls.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import (
)

const (
TRACKED_FILES string = "watched-files"
TRACKED_FOLDERS string = "watched-folders"
WATCH_LIST string = "watch-list"
TRACKED_FILES string = "monitored-files"
TRACKED_FOLDERS string = "monitored-folders"
WATCH_LIST string = "watching"
WATCH_ADD string = "watch-add"
WATCH_REMOVE string = "watch-remove"
DAEMON_STATUS string = "status"
STORAGE_STATUS string = "status-storage"
NETWORK_STATUS string = "status-network"
CONTRACT_STATUS string = "status-contract"
STORAGE_STATUS string = "storage"
NETWORK_STATUS string = "network"
CONTRACT_STATUS string = "contracts"
SHOW_PEERS string = "peers"
ALL_FILES string = "files"
FILE_HISTORY string = "history"
Expand Down Expand Up @@ -95,7 +95,7 @@ func PrintFiles(ip string, port int, verbose bool, help bool) {
}
} else {
if len(status.ReferencedFiles) == 0 {
fmt.Print("No files have been backed up yet.")
fmt.Println("No files have been backed up yet.")
} else {
fmt.Printf("File(s):\n\t%s\n", strings.Join(daemon.GetFiles(status), "\n\t"))
}
Expand Down Expand Up @@ -124,7 +124,7 @@ func PrintNetworkStatus(ip string, port int, verbose bool, help bool) {
status.PeerListeningPort,
status.UpnpAddress)
} else {
fmt.Print("Networking Disabled. Enable Contracts for Networking.")
fmt.Println("Networking Disabled. Enable Contracts for Networking.")
}

}
Expand Down Expand Up @@ -152,7 +152,7 @@ func PrintContractStatus(ip string, port int, verbose bool, help bool) {
len(status.PartiallyDeployedShards),
len(status.FullyDeployedShards))
} else {
fmt.Print("Peer Contracts Disabled.")
fmt.Println("Peer Contracts Disabled.")
}

}
Expand All @@ -175,7 +175,7 @@ func PrintContractedPeers(ip string, port int, verbose bool, help bool) {
} else {
if status.Enabled {
if len(status.ContractedPeers) == 0 {
fmt.Print("No peers have been contracted.")
fmt.Println("No peers have been contracted.")
} else {
fmt.Printf("Contracted Peer(s):\n\t%s\n", strings.Join(status.ContractedPeers, "\n\t"))
}
Expand Down Expand Up @@ -247,7 +247,7 @@ func PrintWatchedFolders(ip string, port int, verbose bool, help bool) {

func ModifyWatchedFolders(ip string, port int, verbose bool, help bool, opType string, recursive bool, args []string) {
if help {
fmt.Printf("Usage: membrane %s <folder>\nOptions:\n\t-r\trecursive watch folder", opType)
fmt.Printf("Usage: membrane %s <folder>\nOptions:\n\t-r\trecursive watch folder\n", opType)
} else {
if len(args) < 1 {
fmt.Fprint(os.Stderr, "Invalid arguments supplied. Check usage.\n")
Expand Down
2 changes: 1 addition & 1 deletion src/domhauton.com/membranecli/membrane.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func main() {
case commands.FILE_RECOVER:
commands.RecoverFile(ip, port, help, args[commandStart+1:])
default:
fmt.Fprintf(os.Stderr, "Invalid command. %s", command)
fmt.Fprintf(os.Stderr, "Invalid command. '%s'\n", command)
os.Exit(1)
}
}
Expand Down

0 comments on commit e657dc9

Please sign in to comment.