Merge commit 'refs/merge-requests/6' of git://gitorious.org/fish-shell/fish-shell into merge_req_6

This commit is contained in:
Christopher Nilsson 2010-11-24 22:34:29 +11:00
commit dcecab384a
10 changed files with 41 additions and 8 deletions

View File

@ -31,6 +31,8 @@
# hallucinations.
#
# Used by docdir
PACKAGE_TARNAME = @PACKAGE_TARNAME@
#
# Programs
@ -46,6 +48,7 @@ INSTALL:=@INSTALL@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
datadir = @datadir@
bindir = @bindir@
mandir = @mandir@

View File

@ -6,7 +6,7 @@
\subsection complete-description Description
For an introduction to how to specify completions, see the section <a
href='index.html#completions-own'>Writing your own completions</a> of
href='index.html#completion-own'>Writing your own completions</a> of
the fish manual.
- <tt>COMMAND</tt> is the name of the command for which to add a completion

View File

@ -1,4 +1,4 @@
\section fish_indent fish_indent - indenter and prettyfier
\section fish_indent fish_indent - indenter and prettifier
\subsection fish_indent-synopsis Synopsis
<tt>fish_indent [options]</tt>

2
exec.c
View File

@ -1575,7 +1575,7 @@ void exec( job_t *j )
{
debug( 3, L"Set status of %ls to %d using short circut", j->command, p->status );
int status = proc_format_status(p->status);
int status = p->status;
proc_set_last_status( job_get_flag( j, JOB_NEGATE )?(!status):status );
}
break;

View File

@ -2319,8 +2319,12 @@ static void eval_job( tokenizer *tok )
j = job_create();
job_set_flag( j, JOB_FOREGROUND, 1 );
job_set_flag( j, JOB_TERMINAL, job_get_flag( j, JOB_CONTROL ) );
job_set_flag( j, JOB_TERMINAL, job_get_flag( j, JOB_CONTROL ) && (!is_subshell && !is_event));
job_set_flag( j, JOB_SKIP_NOTIFICATION, is_subshell || is_block || is_event || (!is_interactive));
job_set_flag( j, JOB_TERMINAL, job_get_flag( j, JOB_CONTROL ) \
&& (!is_subshell && !is_event));
job_set_flag( j, JOB_SKIP_NOTIFICATION, is_subshell \
|| is_block \
|| is_event \
|| (!is_interactive));
current_block->job = j;

View File

@ -150,7 +150,7 @@ function __fish_config_interactive -d "Initializations that should be performed
fish_greeting
else
if set -q fish_greeting
switch $fish_greeting
switch "$fish_greeting"
case ''
# If variable is empty, don't print anything, saves us a fork

View File

@ -21,6 +21,8 @@ function eval -S -d "Evaluate parameters as a command"
end
echo begin\; $argv \;end eval2_inner \<\&3 3\<\&- | . 3<&0
set -l res $status
status --job-control $mode
return $res
end

View File

@ -86,7 +86,7 @@ function help --description "Show help for the fish shell"
# documentation. It's a bit of a hack, since it relies on the
# Doxygen markup format to never change.
case (sed -n < $__fish_help_dir/commands.html -e "s/.*<h2><a class=\"anchor\" name=\"\([^\"]*\)\">.*/\1/p")
case (sed -n 's/.*<h2><a class="anchor" \(id\|name\)="\([^"]*\)">.*/\2/p' $__fish_help_dir/commands.html)
set fish_help_page "commands.html\#$fish_help_item"
case $help_topics
set fish_help_page "index.html\#$fish_help_item"

View File

@ -1,5 +1,5 @@
#
#Test aliases loops and conditionals
#Test aliases, loops, conditionals and some basic elements
#
for i in 1 2 #Comment on same line as command
@ -51,3 +51,25 @@ for i in Test for continue break and switch builtins problems;
end
end
set -l sta
if eval true
if eval false
set sta fail
else
set sta pass
end
else
set sta fail
end
echo Test 4 $sta
function test_builtin_status
return 1
end
test_builtin_status
if [ $status -eq 1 ]
set sta pass
else
set sta fail
end
echo Test 5 $sta

View File

@ -5,3 +5,5 @@
Test 2 pass
Test pass
Test 3 pass
Test 4 pass
Test 5 pass