Skip to content

Implement prompt templating support via $PS1#214

Merged
prsabahrami merged 3 commits intoprefix-dev:mainfrom
certik:ps1
Jan 29, 2025
Merged

Implement prompt templating support via $PS1#214
prsabahrami merged 3 commits intoprefix-dev:mainfrom
certik:ps1

Conversation

@certik
Copy link
Collaborator

@certik certik commented Jan 29, 2025

This is just an initial support, so far only two templates are supported, using a custom format. Later, we should use some templating engine, and consider compatibility with either Bash or with Zsh.

Fixes #200.

This is just an initial support, so far only two templates are supported, using
a custom format. Later, we should use some templating engine, and consider
compatibility with either Bash or with Zsh.

Fixes prefix-dev#200.
@certik
Copy link
Collaborator Author

certik commented Jan 29, 2025

Now it works:

~/repos/shell(ps1)$ PS1="(env) ${PS1} "
(env) ~/repos/shell(ps1)$ ls

@prsabahrami
Copy link
Contributor

Great! Thanks!

@certik certik requested a review from prsabahrami January 29, 2025 05:54
@certik
Copy link
Collaborator Author

certik commented Jan 29, 2025

This is ready for review.

Copy link
Contributor

@prsabahrami prsabahrami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

@prsabahrami prsabahrami merged commit 702028d into prefix-dev:main Jan 29, 2025
6 checks passed
@certik certik deleted the ps1 branch January 29, 2025 05:57
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.

Make the prompt configurable (via $PS1 or similar)

2 participants