Skip to content

unset IFS before evaluating each function in $PROMPT_COMMAND#148666

Merged
meganrogge merged 2 commits intomainfrom
merogge/git-bash
May 3, 2022
Merged

unset IFS before evaluating each function in $PROMPT_COMMAND#148666
meganrogge merged 2 commits intomainfrom
merogge/git-bash

Conversation

@meganrogge
Copy link
Copy Markdown
Collaborator

So as to avoid interfering with IFS used in that function

This PR fixes #146377

@meganrogge
Copy link
Copy Markdown
Collaborator Author

meganrogge commented May 3, 2022

This error occurs when the variable being referenced is undefined

160956139-26c99e57-1296-4f68-8564-81705c19576c

So I found where test was getting called on variables and found those were not defined
Screen Shot 2022-05-03 at 3 20 06 PM

@meganrogge
Copy link
Copy Markdown
Collaborator Author

Those get set in gitstatus.sh here using IFS
Screen Shot 2022-05-03 at 3 21 01 PM

@meganrogge
Copy link
Copy Markdown
Collaborator Author

Since we were setting IFS to parse the PROMPT_COMMAND in order to call that function, and only unsetting it after, that was interfering with the IFS used within the function.

Screen Shot 2022-05-03 at 3 24 40 PM

@meganrogge meganrogge self-assigned this May 3, 2022
@meganrogge meganrogge requested a review from Tyriar May 3, 2022 22:28
@meganrogge meganrogge added this to the May 2022 milestone May 3, 2022
@meganrogge meganrogge merged commit bf33c14 into main May 3, 2022
@meganrogge meganrogge deleted the merogge/git-bash branch May 3, 2022 22:55
@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Experimental shell integration breaks bash-git-prompt

2 participants