Skip to content

Commit

Permalink
tl_set_prompt() now only prints the new prompt the first time.
Browse files Browse the repository at this point in the history
  • Loading branch information
biot committed Nov 22, 2014
1 parent a6a83a0 commit 8e4d2c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tokenline.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,9 @@ void tl_init(t_tokenline *tl, t_token *tokens_top, t_token_dict *token_dict,

void tl_set_prompt(t_tokenline *tl, char *prompt)
{
if (!tl->prompt)
tl->print(tl->user, prompt);
tl->prompt = prompt;
tl->print(tl->user, tl->prompt);
}

void tl_set_callback(t_tokenline *tl, tl_callback callback)
Expand Down

0 comments on commit 8e4d2c1

Please sign in to comment.