Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Update docs 0.0.11.9 finish
Browse files Browse the repository at this point in the history
  • Loading branch information
watchakorn-18k committed Apr 2, 2023
1 parent 5ddeff7 commit bbabe6f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
12 changes: 12 additions & 0 deletions docs/how-to-guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,15 @@ fenv clean
```

Clean, remove all packages like new.

```
fenv activate
```

Command hint to activate virtual environment with folder

```
fenv deactivate
```

Command hint to deactivate virtual environment with folder
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Commands:
tree path.
onlyenv Create only virtualenv and no create
base file
clean Clean delete all packages in requirements.txt out
activate Command hint to activate virtual environment with folder
deactivate Command hint to deactivate virtual environment with folder
General Options:
-h, --help Show this help message and exit
Expand Down
1 change: 1 addition & 0 deletions docs/state_env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: fenv.state_env
11 changes: 9 additions & 2 deletions fenv/state_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@

class StateEnv:
def activate(self):
"""
If the environment name is not empty, then if the operating system is Windows, then if the
operating system is Windows and the terminal is xterm-256color, then print the message
"""

if ENV_NAME:
if os_win:
if os_win and os.environ.get("TERM") == "xterm-256color":
Expand All @@ -30,8 +35,6 @@ def activate(self):
print(
f"It cannot be enabled, but you can run it using the \n {colors.SPRING_GREEN}`{ENV_NAME}\\Scripts\\activate.bat`{colors.ENDC} command"
)

# os.system(rf".\{path_env_win}\activate")
elif os_linux:
if EnvAll().get_terminal_bash():
print(
Expand All @@ -41,6 +44,10 @@ def activate(self):
print("The virtual environment was not found when creating it with fenv.")

def deactivate(self):
"""
If the environment is found, it will print a message to the user that it cannot be enabled, but
it can be run using the `deactivate` command
"""
if ENV_NAME:
if os_win:
if os_win and os.environ.get("TERM") == "xterm-256color":
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ nav:
- Class Manage File: manage_file.md
- Class Commands: commands.md
- Class Colors: colors.md
- Class State Environment: state_env.md
theme:
language: en

Expand Down

0 comments on commit bbabe6f

Please sign in to comment.