mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-14 01:32:49 +08:00
Merge branch 'master' into ast
This commit is contained in:
commit
2ffc2a288c
18
proc.cpp
18
proc.cpp
|
@ -296,15 +296,19 @@ int job_is_stopped(const job_t *j)
|
|||
|
||||
\param j the job to test
|
||||
*/
|
||||
int job_is_completed(const job_t *j)
|
||||
bool job_is_completed(const job_t *j)
|
||||
{
|
||||
process_t *p;
|
||||
assert(j->first_process != NULL);
|
||||
for (p = j->first_process; p->next; p = p->next)
|
||||
;
|
||||
|
||||
return p->completed;
|
||||
|
||||
bool result = true;
|
||||
for (process_t *p = j->first_process; p != NULL; p = p->next)
|
||||
{
|
||||
if (! p->completed)
|
||||
{
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void job_set_flag(job_t *j, unsigned int flag, int set)
|
||||
|
|
2
proc.h
2
proc.h
|
@ -507,7 +507,7 @@ int job_is_stopped(const job_t *j);
|
|||
/**
|
||||
Tests if the job has completed, i.e. if the last process of the pipeline has ended.
|
||||
*/
|
||||
int job_is_completed(const job_t *j);
|
||||
bool job_is_completed(const job_t *j);
|
||||
|
||||
/**
|
||||
Reassume a (possibly) stopped job. Put job j in the foreground. If
|
||||
|
|
|
@ -209,7 +209,7 @@ function __fish_git_prompt --description "Prompt function for Git"
|
|||
test -n "$git_dir"; or return
|
||||
|
||||
set -l r (__fish_git_prompt_current_operation $git_dir)
|
||||
set -l b (__fish_git_prompt_current_branch)
|
||||
set -l b (__fish_git_prompt_current_branch $git_dir)
|
||||
set -l w #dirty working directory
|
||||
set -l i #staged changes
|
||||
set -l s #stashes
|
||||
|
@ -322,6 +322,7 @@ function __fish_git_prompt_current_branch_bare --description "__fish_git_prompt
|
|||
end
|
||||
|
||||
function __fish_git_prompt_current_branch --description "__fish_git_prompt helper, returns the current Git branch"
|
||||
set -l git_dir $argv[1]
|
||||
set -l branch
|
||||
|
||||
set -l os
|
||||
|
|
Loading…
Reference in New Issue
Block a user