Skip to content

feat(prompt): display current working directory in REPL prompt#1

Merged
devnchill merged 2 commits intodevnchill:mainfrom
darshan2456:cwd_in_prompt
Mar 3, 2026
Merged

feat(prompt): display current working directory in REPL prompt#1
devnchill merged 2 commits intodevnchill:mainfrom
darshan2456:cwd_in_prompt

Conversation

@darshan2456
Copy link
Copy Markdown
Contributor

This PR updates the shell prompt to dispay cwd dynamically, similar to common Unix shells like bash.

Changes:
1 - created a function build_prompt() in helpers/ to construct the prompt using getcwd().
2 - Updated the REPL loop in main.c to call build_prompt() and passed the result to readLine().

Note:
1 - ensured memory is freed on all exit paths
2 - No changes were made to parsing or execution logic.

@devnchill devnchill merged commit cc4fb5d into devnchill:main Mar 3, 2026
@devnchill
Copy link
Copy Markdown
Owner

thanks :)

@darshan2456 darshan2456 deleted the cwd_in_prompt branch March 3, 2026 11:57
@darshan2456 darshan2456 restored the cwd_in_prompt branch March 3, 2026 11:57
@darshan2456 darshan2456 deleted the cwd_in_prompt branch March 3, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants