Output remote file to stdout: cat
(self, arg)
| 525 | |
| 526 | # ------------------------[ cat <file> ]------------------------------ |
| 527 | def do_cat(self, arg): |
| 528 | "Output remote file to stdout: cat <file>" |
| 529 | if not arg: |
| 530 | arg = eval(input("Remote file: ")) |
| 531 | path = self.rpath(arg) |
| 532 | str_recv = self.get(path) |
| 533 | if str_recv != c.NONEXISTENT: |
| 534 | rsize, data = str_recv |
| 535 | output().raw(data.strip()) |
| 536 | |
| 537 | # ------------------------[ edit <file> ]----------------------------- |
| 538 | def do_edit(self, arg): |