https://github.com/devnyxie/minishell
https://github.com/devnyxie/minishell
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devnyxie/minishell
- Owner: devnyxie
- Created: 2025-05-23T10:15:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-03T16:13:06.000Z (about 1 year ago)
- Last Synced: 2025-06-04T00:37:54.019Z (about 1 year ago)
- Language: C
- Size: 66.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MiniShell
## Development
### Branching
- `main`: The main branch, which should always be stable.
- `any other branch`: Feature branches for development. These branches can be named according to the feature being developed, e.g., `feature/command-parser`.
- Switching branches;
```bash
git switch -c your-branch-name
```
*-c creates the branch if it doesn't exist already.*
- Stashing changes:
```bash
git stash
git stash apply
```
- Pushing to the remote:
```bash
git push origin your-branch-name
```
## Other
### Reusable Samples
#### CMDs and ARGs output
```c
printf("=== Parsed commands ===\n");
current_cmd = shell_input->first_cmd;
while(current_cmd != NULL) {
printf(" Name: %s,", current_cmd->name);
printf(" Args:");
for (int i = 0; current_cmd->args[i]; i++)
{
printf(" \"%s\"", current_cmd->args[i]);
}
current_cmd = current_cmd->next;
}
printf("\n=======================\n");
```