Merge branch 'master' into ast

This commit is contained in:
ridiculousfish 2013-11-06 13:14:52 -08:00
commit 5d84e86d89
14 changed files with 1187 additions and 798 deletions

View file

@ -1,4 +1,3 @@
# Copyright (C) 2005-2006 Axel Liljencrantz
#
# This program is free software; you can redistribute it and/or modify
@ -61,7 +60,7 @@ optbindirs = @optbindirs@
# Various flags
#
MACROS = -DLOCALEDIR=\"$(localedir)\" -DPREFIX=L\"$(prefix)\" -DDATADIR=L\"$(datadir)\" -DSYSCONFDIR=L\"$(sysconfdir)\" -DBINDIR=L\"$(bindir)\"
MACROS = -DLOCALEDIR=\"$(localedir)\" -DPREFIX=L\"$(prefix)\" -DDATADIR=L\"$(datadir)\" -DSYSCONFDIR=L\"$(sysconfdir)\" -DBINDIR=L\"$(bindir)\" -DDOCDIR=L\"$(docdir)\"
CXXFLAGS = @CXXFLAGS@ $(MACROS) $(EXTRA_CXXFLAGS)
LDFLAGS = @LIBS@ @LDFLAGS@
LDFLAGS_FISH = ${LDFLAGS} @LIBS_FISH@ @LDFLAGS_FISH@
@ -233,7 +232,7 @@ TESTS_DIR_FILES := $(TEST_IN) $(TEST_IN:.in=.out) $(TEST_IN:.in=.err) \
# Files in ./share/completions/
#
COMPLETIONS_DIR_FILES := $(wildcard share/completions/*.fish)
COMPLETIONS_DIR_FILES := $(wildcard share/completions/*.fish) share/completions/..fish
#
@ -742,7 +741,7 @@ uninstall-translations:
#
fish: $(FISH_OBJS) fish.o
$(CXX) $(FISH_OBJS) fish.o $(LDFLAGS_FISH) -o $@
$(CXX) $(CXXFLAGS) $(FISH_OBJS) fish.o $(LDFLAGS_FISH) -o $@
#
@ -750,7 +749,7 @@ fish: $(FISH_OBJS) fish.o
#
fish_pager: $(FISH_PAGER_OBJS)
$(CXX) $(FISH_PAGER_OBJS) $(LDFLAGS_FISH_PAGER) -o $@
$(CXX) $(CXXFLAGS) $(FISH_PAGER_OBJS) $(LDFLAGS_FISH_PAGER) -o $@
#
@ -758,7 +757,7 @@ fish_pager: $(FISH_PAGER_OBJS)
#
fishd: $(FISHD_OBJS)
$(CXX) $(FISHD_OBJS) $(LDFLAGS_FISHD) -o $@
$(CXX) $(CXXFLAGS) $(FISHD_OBJS) $(LDFLAGS_FISHD) -o $@
#
@ -766,7 +765,7 @@ fishd: $(FISHD_OBJS)
#
fish_tests: $(FISH_TESTS_OBJS)
$(CXX) $(FISH_TESTS_OBJS) $(LDFLAGS_FISH) -o $@
$(CXX) $(CXXFLAGS) $(FISH_TESTS_OBJS) $(LDFLAGS_FISH) -o $@
#
@ -776,7 +775,7 @@ fish_tests: $(FISH_TESTS_OBJS)
#
mimedb: $(MIME_OBJS)
$(CXX) $(MIME_OBJS) $(LDFLAGS_MIMEDB) -o $@
$(CXX) $(CXXFLAGS) $(MIME_OBJS) $(LDFLAGS_MIMEDB) -o $@
#
@ -784,7 +783,7 @@ mimedb: $(MIME_OBJS)
#
fish_indent: $(FISH_INDENT_OBJS)
$(CXX) $(FISH_INDENT_OBJS) $(LDFLAGS_FISH_INDENT) -o $@
$(CXX) $(CXXFLAGS) $(FISH_INDENT_OBJS) $(LDFLAGS_FISH_INDENT) -o $@
#
@ -792,7 +791,7 @@ fish_indent: $(FISH_INDENT_OBJS)
#
key_reader: key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o
$(CXX) key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o $(LDFLAGS_FISH) -o $@
$(CXX) $(CXXFLAGS) key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o $(LDFLAGS_FISH) -o $@
#

View file

@ -50,7 +50,7 @@ on RedHat, CentOS, or Amazon EC2:
## Packages for Linux
Nightly builds for several Linux distros can be downloaded from <http://download.opensuse.org/repositories/home:/siteshwar/>
Instructions on how to find builds for several Linux distros are at <https://github.com/fish-shell/fish-shell/wiki/Nightly-builds>
## Switching to fish

View file

@ -123,7 +123,7 @@ static void builtin_jobs_print(const job_t *j, int mode, int header)
/*
Print table header before first job
*/
stdout_buffer.append(_(L"Procces\n"));
stdout_buffer.append(_(L"Process\n"));
}
for (p=j->first_process; p; p=p->next)

View file

@ -238,56 +238,24 @@ AS_IF([test "$use_doxygen" != "no"],
CXXFLAGS="$CXXFLAGS -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64"
# fish does not use exceptions
# Disabling exceptions saves about 20% (!) of the compiled code size
CXXFLAGS="$CXXFLAGS -fno-exceptions"
#
# If we are using gcc, set some flags that increase the odds of the
# compiler producing a working binary...
# -Wall is there to keep me on my toes
#
if test "$GCC" = yes; then
CXXFLAGS="$CXXFLAGS -Wall"
#
# -fno-optimize-sibling-calls seems to work around a bug where
# sending a SIGWINCH to fish on NetBSD 3.0 causes fish to exit when
# compiled with GCC 3.3.3. This is probably either a compiler bug
# or a libc bug, but adding this flag seems to fix things for
# now. Long term, the real problem should be tracked down and
# truly fixed, at which point we can remove this silly flag. This
# bug has been verified to not exist on Linux using GCC 3.3.3.
#
GCC_VERSION=$($CC -dumpversion)
GCC_VERSION_MAJOR=$(echo $GCC_VERSION | cut -d'.' -f1)
GCC_VERSION_MINOR=$(echo $GCC_VERSION | cut -d'.' -f2)
GCC_VERSION_PATCH=$(echo $GCC_VERSION | cut -d'.' -f3)
if test "$GCC_VERSION_MAJOR" -le 3; then
if test 0"$GCC_VERSION_MINOR" -le 3; then
if test 0"$GCC_VERSION_PATCH" -le 3; then
CXXFLAGS="$CXXFLAGS -fno-optimize-sibling-calls"
fi
fi
fi
# fish does not use exceptions
# Disabling exceptions saves about 20% (!) of the compiled code size
CXXFLAGS="$CXXFLAGS -fno-exceptions"
#
# -Wall is there to keep me on my toes
#
# Some day...
CXXFLAGS="$CXXFLAGS -Wall"
#
# This is needed in order to get the really cool backtraces on Linux
#
if test `uname` != "Darwin"; then
LDFLAGS_FISH="$LDFLAGS_FISH -rdynamic"
fi
#
# This is needed in order to get the really cool backtraces on Linux
#
if test `uname` != "Darwin"; then
LDFLAGS_FISH="$LDFLAGS_FISH -rdynamic"
fi

View file

@ -20,6 +20,10 @@ The return status of \c source is the return status of the last job to
execute. If something goes wrong while opening or reading the file,
\c source exits with a non-zero status.
\c . (a single period) is an alias for the \c source command. The use of \c .
is deprecated in favour of \c source, and \c . will be removed in a future
version of fish.
\subsection source-example Example
<tt>source ~/.config/fish/config.fish</tt> causes fish to re-read its initialization file.

View file

@ -721,7 +721,7 @@ function fish_prompt
end
</pre>
<p>See the documentation for <a href="docs/current/commands.html#funced">funced</a> and <a href="docs/current/commands.html#funcsave">funcsave</a> for ways to create these files automatically.
<p>See the documentation for <a href="commands.html#funced">funced</a> and <a href="commands.html#funcsave">funcsave</a> for ways to create these files automatically.
<h3>Universal Variables</h2>
@ -740,7 +740,7 @@ vim
<h3>Ready for more?</h2>
<p>If you want to learn more about fish, there is <a href="docs/current/">lots of detailed documentation</a>, an <a href="https://lists.sourceforge.net/lists/listinfo/fish-users">official mailing list</a>, the IRC channel <tt>#fish</tt> on <tt>irc.oftc.net</tt>, and the <a href="http://github.com/fish-shell/fish-shell/">github page</a>.
<p>If you want to learn more about fish, there is <a href="index.html">lots of detailed documentation</a>, an <a href="https://lists.sourceforge.net/lists/listinfo/fish-users">official mailing list</a>, the IRC channel <tt>#fish</tt> on <tt>irc.oftc.net</tt>, and the <a href="http://github.com/fish-shell/fish-shell/">github page</a>.
</div>
\endhtmlonly

View file

@ -189,7 +189,8 @@ static struct config_paths_t determine_config_directory_paths(const char *argv0)
paths.bin = base_path + L"/bin";
struct stat buf;
if (0 == wstat(paths.data, &buf) && 0 == wstat(paths.sysconf, &buf))
if (0 == wstat(paths.data, &buf) && 0 == wstat(paths.sysconf, &buf) &&
0 == wstat(paths.doc, &buf))
{
done = true;
}
@ -202,7 +203,7 @@ static struct config_paths_t determine_config_directory_paths(const char *argv0)
/* Fall back to what got compiled in. */
paths.data = L"" DATADIR "/fish";
paths.sysconf = L"" SYSCONFDIR "/fish";
paths.doc = L"" DATADIR "/doc/fish";
paths.doc = L"" DOCDIR;
paths.bin = L"" BINDIR;
done = true;

View file

@ -1337,6 +1337,7 @@
"DATADIR=L\\\"/usr/local/share\\\"",
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
"BINDIR=L\\\"/usr/local/bin\\\"",
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
"FISH_BUILD_VERSION=\\\"2.1.0\\\"",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@ -1557,6 +1558,7 @@
"DATADIR=L\\\"/usr/local/share\\\"",
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
"BINDIR=L\\\"/usr/local/bin\\\"",
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
"FISH_BUILD_VERSION=\\\"2.1.0\\\"",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
@ -1585,6 +1587,7 @@
"DATADIR=L\\\"/usr/local/share\\\"",
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
"BINDIR=L\\\"/usr/local/bin\\\"",
"DOCDIR=L\\\"/usr/local/share/doc\\\"",
"FISH_BUILD_VERSION=\\\"2.1.0\\\"",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

1848
po/de.po

File diff suppressed because it is too large Load diff

View file

@ -1098,7 +1098,7 @@ static screen_layout_t compute_layout(screen_t *s,
size_t left_prompt_width = left_prompt_layout.last_line_width;
size_t right_prompt_width = right_prompt_layout.last_line_width;
if (left_prompt_layout.max_line_width >= screen_width)
if (left_prompt_layout.max_line_width > screen_width)
{
/* If we have a multi-line prompt, see if the longest line fits; if not neuter the whole left prompt */
left_prompt = L"> ";

View file

@ -1 +0,0 @@
complete -c . -x -a "(__fish_complete_suffix .fish)"

1
share/completions/..fish Symbolic link
View file

@ -0,0 +1 @@
source.fish

View file

@ -19,7 +19,11 @@ function __fish_git_remotes
end
function __fish_git_modified_files
command git status -s | grep -e "^ M" | sed "s/^ M //"
command git ls-files -m --exclude-standard ^/dev/null
end
function __fish_git_add_files
command git ls-files -mo --exclude-standard ^/dev/null
end
function __fish_git_ranges
@ -110,12 +114,14 @@ complete -c git -n '__fish_git_using_command add' -l refresh -d "Don't add the f
complete -c git -n '__fish_git_using_command add' -l ignore-errors -d 'Ignore errors'
complete -c git -n '__fish_git_using_command add' -l ignore-missing -d 'Check if any of the given files would be ignored'
complete -f -c git -n '__fish_git_using_command add; and __fish_contains_opt -s p patch' -a '(__fish_git_modified_files)'
complete -f -c git -n '__fish_git_using_command add' -a '(__fish_git_add_files)'
# TODO options
### checkout
complete -f -c git -n '__fish_git_needs_command' -a checkout -d 'Checkout and switch to a branch'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_branches)' --description 'Branch'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_tags)' --description 'Tag'
complete -f -c git -n '__fish_git_using_command checkout' -a '(__fish_git_modified_files)' --description 'File'
complete -f -c git -n '__fish_git_using_command checkout' -s b -d 'Create a new branch'
complete -f -c git -n '__fish_git_using_command checkout' -s t -l track -d 'Track a new branch'
# TODO options

View file

@ -0,0 +1 @@
complete -c . -x -a "(__fish_complete_suffix .fish)"

View file

@ -117,22 +117,29 @@ function type --description "Print the type of a command"
end
set -l path (which $i ^/dev/null)
if test -x (echo $path)
set res 0
set found 1
switch $mode
case normal
printf (_ '%s is %s\n') $i $path
set -l paths
if test $selection != multi
set paths (which $i ^/dev/null)
else
set paths (which -a $i ^/dev/null)
end
for path in $paths
if test -x (echo $path)
set res 0
set found 1
switch $mode
case normal
printf (_ '%s is %s\n') $i $path
case type
echo (_ 'file')
case path
echo $path
end
if test $selection != multi
continue
end
if test $selection != multi
continue
end
end
end