repl.it
@MATHyou/

Crosh copy

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
print("[Pro Tip] Use 'Open as Window' or 'Fullscreen' to prevent Ctrl-W from closing your terminal!")
print("[Pro Tip] See [crosh] for more information.")

print("Welcome to crosh, the Chrome OS developer shell.")

print("If you got here by mistake, don't panic!  Just close this tab and carry on.")

print("Type 'help' for a list of commands.")

print("If you want to customize the look/behavior, you can use the options page.")
print("Load it by using the Ctrl+Shift+P keyboard shortcut.")
while True:
    var = input("crosh> ")
    if var == "help":
        print("exit")  
        print("    Exit crosh.")

        print("help [command] ")
        print("    Display general help, or details for a specific command.")

        print("help_advanced   ")
        print("    Display the help for more advanced commands, mainly used for debugging.")

        print("ping [-4] [-6] [-c count] [-i interval] [-n] [-s packetsize] [-W waittime] <destination>")
        print("    Send ICMP ECHO_REQUEST packets to a network host.  ")
        print("    If <destination> is 'gw'")
        print("    then the next hop gateway for the default route is used.")
        print("    Default is to use IPv4 [-4] rather than IPv6 [-6] addresses.")

        print("top")   
        print("    Run top.")
    elif var == "exit":
        break
    elif var == "top":
        print("Not avalible")
    elif var == "supercalifragilisticexpialidocious":
        print("Wow.")
    else:
        print("    Error: Unknown command: " + var)