flyshell 1.0.6__tar.gz → 1.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flyshell-1.0.6/src/flyshell.egg-info → flyshell-1.0.7}/PKG-INFO +1 -1
- flyshell-1.0.7/src/flyshell/builtin/diskops.py +28 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/builtin/system.py +0 -23
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/constants.py +3 -2
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/core/data.py +1 -1
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/core/directory.py +2 -2
- {flyshell-1.0.6 → flyshell-1.0.7/src/flyshell.egg-info}/PKG-INFO +1 -1
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell.egg-info/SOURCES.txt +1 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/LICENSE +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/README.md +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/pyproject.toml +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/setup.cfg +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/__init__.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/abstract/__init__.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/abstract/base_cmd.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/abstract/base_plugin.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/abstract/parent_cmd.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/builtin/__init__.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/builtin/fs.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/builtin/utils.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/core/__init__.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/core/auth.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/core/console.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/core/loader.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell/main.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell.egg-info/dependency_links.txt +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell.egg-info/entry_points.txt +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell.egg-info/requires.txt +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/src/flyshell.egg-info/top_level.txt +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/tests/test_auth.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/tests/test_data.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/tests/test_directory.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/tests/test_loader.py +0 -0
- {flyshell-1.0.6 → flyshell-1.0.7}/tests/test_security.py +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# src\flyshell\builtin\diskops.py
|
|
2
|
+
|
|
3
|
+
from flyshell.abstract.base_cmd import BaseCmd
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Dir(BaseCmd):
|
|
9
|
+
name = "dir"
|
|
10
|
+
description = "List all files in the current working directory"
|
|
11
|
+
min_args = 0
|
|
12
|
+
options = None
|
|
13
|
+
aliases = ["ls"]
|
|
14
|
+
|
|
15
|
+
def execute(self, args):
|
|
16
|
+
try:
|
|
17
|
+
current_path = os.getcwd()
|
|
18
|
+
items = os.listdir(current_path)
|
|
19
|
+
lines = [f"\nDirectory: '{current_path}'"]
|
|
20
|
+
for item in items:
|
|
21
|
+
if os.path.isdir(os.path.join(current_path, item)):
|
|
22
|
+
lines.append(f"[DIR] {item}/")
|
|
23
|
+
else:
|
|
24
|
+
lines.append(f"[FILE] {item}")
|
|
25
|
+
lines.append(f"\nTotal items in directory: {len(items)}\n")
|
|
26
|
+
return (0, "\n".join(lines))
|
|
27
|
+
except Exception as e:
|
|
28
|
+
return (1, f"\nSystem Error: Unable to list directory ({e})\n")
|
|
@@ -34,29 +34,6 @@ class Cd(BaseCmd):
|
|
|
34
34
|
)
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
class Dir(BaseCmd):
|
|
38
|
-
name = "dir"
|
|
39
|
-
description = "List all files in the current working directory"
|
|
40
|
-
min_args = 0
|
|
41
|
-
options = None
|
|
42
|
-
aliases = ["ls"]
|
|
43
|
-
|
|
44
|
-
def execute(self, args):
|
|
45
|
-
try:
|
|
46
|
-
current_path = os.getcwd()
|
|
47
|
-
items = os.listdir(current_path)
|
|
48
|
-
lines = [f"\nDirectory: '{current_path}'"]
|
|
49
|
-
for item in items:
|
|
50
|
-
if os.path.isdir(os.path.join(current_path, item)):
|
|
51
|
-
lines.append(f"[DIR] {item}/")
|
|
52
|
-
else:
|
|
53
|
-
lines.append(f"[FILE] {item}")
|
|
54
|
-
lines.append(f"\nTotal items in directory: {len(items)}\n")
|
|
55
|
-
return (0, "\n".join(lines))
|
|
56
|
-
except Exception as e:
|
|
57
|
-
return (1, f"\nSystem Error: Unable to list directory ({e})\n")
|
|
58
|
-
|
|
59
|
-
|
|
60
37
|
class OpenFile(BaseCmd):
|
|
61
38
|
name = "open"
|
|
62
39
|
description = "Open the specified file path"
|
|
@@ -7,8 +7,8 @@ import os
|
|
|
7
7
|
import platform
|
|
8
8
|
import time
|
|
9
9
|
|
|
10
|
-
BUILD =
|
|
11
|
-
VERSION = "1.0.
|
|
10
|
+
BUILD = 106
|
|
11
|
+
VERSION = "1.0.7"
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def _resolve_app_dir() -> Path:
|
|
@@ -53,6 +53,7 @@ REQUIRED_COMPONENTS = [
|
|
|
53
53
|
"abstract/base_plugin.py",
|
|
54
54
|
"abstract/parent_cmd.py",
|
|
55
55
|
"builtin",
|
|
56
|
+
"builtin/diskops.py",
|
|
56
57
|
"builtin/fs.py",
|
|
57
58
|
"builtin/system.py",
|
|
58
59
|
"builtin/utils.py",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from flyshell import constants as c
|
|
4
4
|
from flyshell.abstract.base_cmd import BaseCmd
|
|
5
5
|
from flyshell.abstract.parent_cmd import ParentCmd
|
|
6
|
-
from flyshell.builtin import fs, system, utils
|
|
6
|
+
from flyshell.builtin import diskops, fs, system, utils
|
|
7
7
|
from flyshell.core import auth, data
|
|
8
8
|
|
|
9
9
|
from datetime import datetime, timezone
|
|
@@ -52,7 +52,7 @@ INSTALLED_COMMANDS: list[BaseCmd] = [
|
|
|
52
52
|
system.Cd(),
|
|
53
53
|
Cmds(),
|
|
54
54
|
utils.Clear(),
|
|
55
|
-
|
|
55
|
+
diskops.Dir(),
|
|
56
56
|
fs.Fs(),
|
|
57
57
|
utils.History(),
|
|
58
58
|
utils.Kill(),
|
|
@@ -15,6 +15,7 @@ src/flyshell/abstract/base_cmd.py
|
|
|
15
15
|
src/flyshell/abstract/base_plugin.py
|
|
16
16
|
src/flyshell/abstract/parent_cmd.py
|
|
17
17
|
src/flyshell/builtin/__init__.py
|
|
18
|
+
src/flyshell/builtin/diskops.py
|
|
18
19
|
src/flyshell/builtin/fs.py
|
|
19
20
|
src/flyshell/builtin/system.py
|
|
20
21
|
src/flyshell/builtin/utils.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|