Skip to content

[FEAT] Expand $$ to PID of shell#300

Merged
LeaYeh merged 2 commits intomainfrom
fix-issue-67
Apr 2, 2024
Merged

[FEAT] Expand $$ to PID of shell#300
LeaYeh merged 2 commits intomainfrom
fix-issue-67

Conversation

@itislu
Copy link
Collaborator

@itislu itislu commented Apr 1, 2024


  • It should always expand to the PID of the main shell, regardless which non-interactive child process it is in.

    ($$) Expands to the process ID of the shell. In a subshell, it expands to the process ID of the invoking shell, not the subshell.

  • It was super easy because we already save the main shell PID in the shell struct in order to broadcast errors.

@itislu itislu added the optional feature Cool but not mandatory feature label Apr 1, 2024
@itislu itislu added this to the Expander milestone Apr 1, 2024
@itislu itislu linked an issue Apr 1, 2024 that may be closed by this pull request
itislu added 2 commits April 2, 2024 12:40
* Resolves [OPTIONAL] Handle $$ for expanding the PID of the main shell #67
@LeaYeh LeaYeh merged commit 4adaee4 into main Apr 2, 2024
@LeaYeh LeaYeh deleted the fix-issue-67 branch April 2, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optional feature Cool but not mandatory feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[OPTIONAL] Handle $$ for expanding the PID of the main shell

2 participants