Skip to content

Commit 99a6eb5

Browse files
committed
update: zshrc help
1 parent f92f6b7 commit 99a6eb5

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

.vscode/.zshrc

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
# POST executed after the shell is loaded
22
# This file is loaded after .zshrc
33

4-
# This file can be empty of deleted if not needed
5-
# Loading Order
6-
# vscode ==(inject PROJECT_FOLDER and check settings.json)==> source.zsh (PreHandling)
7-
# source.zsh ==(source env.zsh)==> env.zsh
8-
# source.zsh ==(Check Mode)==> Do any IF condition or keep continue
9-
# source.zsh ==(exec zsh -i)==> ~/.zshrc
10-
# ~/.zshrc ==(contains weapon_vscode_launch_helper function)==> launch_helper.zsh
11-
# ~/.zshrc ==(if set, PROJECT_FOLDER and .vscode/.zshrc exists, source it)==> .vscode/.zshrc
12-
13-
# you can define any function
4+
# you can define any functions,settings,automation here.
145

156
source ${PROJECT_FOLDER}/.vscode/env.zsh
167

@@ -68,6 +59,9 @@ if [ "$REVERSE_SHELL_MODE" ]; then
6859
exit 0
6960
fi
7061

62+
# Here is mode if-tree complete, Now will launch the shell
63+
64+
# Start the virtual environment if exists
7165
if [ -d "$PROJECT_FOLDER/venv" ]; then
7266
source $PROJECT_FOLDER/venv/bin/activate
7367
fi

.vscode/env.zsh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,3 @@ unset https_proxy http_proxy all_proxy
6868
# export http_proxy=
6969
# export https_proxy=
7070
# export all_proxy=
71-
72-
# if you need to set functions definitions, you can do it here
73-
# source $PROJECT_FOLDER/.vscode/utils.zsh

documents/LaunchOrder.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# all zsh file launch order
22

3+
> This is out of date, the new launch order is at next section.
4+
> v0.2.0
5+
36
```mermaid
47
graph TD;
58
@@ -8,4 +11,14 @@ source.zsh ==(1.source env.zsh)==> source.zsh_enved(.vscode/source.zsh) ==(2.Ch
811
source.zsh_call_zsh(.vscode/source.zsh) ==(exec zsh -i)==> home_zshrc(~/.zshrc)
912
home_zshrc ==(contains weapon_vscode_launch_helper function)==> home_zshrc_call_helper(~/.zshrc)
1013
home_zshrc_call_helper ==(if set env PROJECT_FOLDER and file .vscode/.zshrc exists, source it)==> execute_project_folder_zshrc(.vscode/.zshrc)
14+
```
15+
16+
# new zsh launch order
17+
18+
> This is the new launch order for zsh files in vscode terminal.
19+
20+
```mermaid
21+
graph TD;
22+
vscode ==(inject PROJECT_FOLDER and check settings.json)==> homezshrc ==(~/.zshrc)==> LaunchHelper(code in launch_helper.zsh and packed createhackenv.sh) ==(PROJECT_FOLDER is set!)==> zshrc(.vscode/.zshrc)
23+
zshrc ==(1.source env.zsh)==> zshrc_enved(.vscode/.zshrc) ==(2.Check Mode)==> zshrc_mode(.vscode/.zshrc) ==> zshrc_call_zsh(.vscode/.zshrc) & node(execute other commands like netcat handler)
1124
```

0 commit comments

Comments
 (0)