aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mark Griffiths <mark@thebespokepixel.com>2014-08-05 13:50:21 +0100
committerGravatar Mark Griffiths <mark@thebespokepixel.com>2014-08-05 13:50:21 +0100
commitcff928e2dc665560b88177820d66fe705bf73bde (patch)
tree7f277c387a31fdbf6af81829d901d911277809d0
parent6aa701b3ee211dd9559d66ac3268151fb6e5c359 (diff)
parent33c714ca039126f3911fe39719d957c6deadef32 (diff)
Merge branch 'master' into documentation-update
Conflicts: doc_src/index.hdr.in -- UPDATED doc_src/license.hdr -- UPDATED
-rw-r--r--builtin.cpp2
-rw-r--r--configure.ac4
-rw-r--r--doc_src/index.hdr.in65
-rw-r--r--doc_src/license.hdr30
-rw-r--r--fallback.cpp79
-rw-r--r--fallback.h4
-rw-r--r--fish.xcodeproj/project.pbxproj315
-rw-r--r--fish.xcodeproj/xcshareddata/xcschemes/fish_tests.xcscheme93
-rw-r--r--fish_tests.cpp22
-rw-r--r--osx/config.h6
-rw-r--r--reader.cpp56
-rw-r--r--reader.h4
-rw-r--r--share/completions/grunt.fish3
-rw-r--r--share/tools/web_config/js/controllers.js20
-rwxr-xr-xshare/tools/web_config/webconfig.py69
15 files changed, 396 insertions, 376 deletions
diff --git a/builtin.cpp b/builtin.cpp
index 5ab3ea43..cb06481f 100644
--- a/builtin.cpp
+++ b/builtin.cpp
@@ -3251,7 +3251,7 @@ static int builtin_fg(parser_t &parser, wchar_t **argv)
const wcstring ft = tok_first(j->command_wcstr());
if (! ft.empty())
env_set(L"_", ft.c_str(), ENV_EXPORT);
- reader_write_title();
+ reader_write_title(j->command());
make_first(j);
job_set_flag(j, JOB_FOREGROUND, 1);
diff --git a/configure.ac b/configure.ac
index b46accb7..037ee8fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -389,7 +389,7 @@ fi
# Check presense of various header files
#
-AC_CHECK_HEADERS([getopt.h termios.h sys/resource.h term.h ncurses/term.h ncurses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h execinfo.h spawn.h sys/sysctl.h sys/un.h sys/ucred.h ucred.h ])
+AC_CHECK_HEADERS([getopt.h termios.h sys/resource.h term.h ncurses/term.h ncurses.h curses.h stropts.h siginfo.h sys/select.h sys/ioctl.h execinfo.h spawn.h sys/sysctl.h])
if test x$local_gettext != xno; then
AC_CHECK_HEADERS([libintl.h])
@@ -535,7 +535,7 @@ fi
AC_CHECK_FUNCS( wcsdup wcsndup wcslen wcscasecmp wcsncasecmp fwprintf )
AC_CHECK_FUNCS( futimes wcwidth wcswidth wcstok fputwc fgetwc )
AC_CHECK_FUNCS( wcstol wcslcat wcslcpy lrand48_r killpg mkostemp )
-AC_CHECK_FUNCS( backtrace backtrace_symbols sysconf getifaddrs getpeerucred getpeereid )
+AC_CHECK_FUNCS( backtrace backtrace_symbols sysconf getifaddrs )
if test x$local_gettext != xno; then
AC_CHECK_FUNCS( gettext dcgettext )
diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in
index ca4e95f9..0f460450 100644
--- a/doc_src/index.hdr.in
+++ b/doc_src/index.hdr.in
@@ -128,33 +128,34 @@ separation of errors and warnings from regular program output.
Any file descriptor can be directed to a different output than its default through a simple mechanism called a redirection.
-
An example of a file redirection is `echo hello > output.txt`, which directs the output of the echo command to the file output.txt.
-- To redirect standard input, write `<SOURCE_FILE`
-- To redirect standard output, write `>DESTINATION`
-- To redirect standard error, write `^DESTINATION`
-- To redirect standard output to a file which will be appended, write `>>DESTINATION_FILE`
-- To redirect standard error to a file which will be appended, write `^^DESTINATION_FILE`
-
+- To read standard input from a file, write `<SOURCE_FILE`
+- To write standard output to a file, write `DESTINATION`
+- To write standard error to a file, write `^DESTINATION`
+- To append standard output to a file, write `>>DESTINATION_FILE`
+- To append standard error to a file, write `^^DESTINATION_FILE`
`DESTINATION` can be one of the following:
-- A filename. The output will be written to the specified file. An ampersand '`&`' followed by the number of another file descriptor. The file descriptor will be a duplicate of the specified file descriptor.
-- An ampersand followed by a minus sign '`&-`'. The file descriptor will be closed.
+- A filename. The output will be written to the specified file.
+- An ampersand (`&`) followed by the number of another file descriptor. The output will be written to that file descriptor instead.
+- An ampersand followed by a minus sign (`&-`). The file descriptor will be closed.
Example:
To redirect both standard output and standard error to the file 'all_output.txt', you can write `echo Hello > all_output.txt ^&1`.
-Any FD can be redirected in an arbitrary way by prefixing the redirection with the number of the FD.
+Any file descriptor can be redirected in an arbitrary way by prefixing the
+redirection with the file descriptor.
-- To redirect input of FD number N, write `N<DESTINATION`
-- To redirect output of FD number N, write `N>DESTINATION`
-- To redirect output of FD number N to a file which will be appended, write `N>>DESTINATION_FILE`
-
-Example: `echo Hello 2>-` and `echo Hello ^-` are equivalent.
+- To redirect input of FD N, write `N<DESTINATION`
+- To redirect output of FD N, write `N>DESTINATION`
+- To append the output of FD N to a file, write `N>>DESTINATION_FILE`
+Example: `echo Hello 2>output.stderr` and `echo Hello
+^output.stderr` are equivalent, and write the standard error (file
+descriptor 2) of the target program to `output.stderr`.
\subsection piping Piping
@@ -658,7 +659,8 @@ All arrays are one-dimensional and cannot contain other arrays, although it is p
\subsection variables-special Special variables
-The user can change the settings of `fish` by changing the values of certain environment variables.
+The user can change the settings of `fish` by changing the values of
+certain environment variables.
- `BROWSER`, the user's preferred web browser. If this variable is set, fish will use the specified browser instead of the system default browser to display the fish documentation.
- `CDPATH`, an array of directories in which to search for the new directory for the `cd` builtin. By default, the fish configuration defines `CDPATH` to be a universal variable with the values `.` and `~`.
@@ -669,7 +671,9 @@ The user can change the settings of `fish` by changing the values of certain env
- `PATH`, an array of directories in which to search for commands
- `umask`, the current file creation mask. The preferred way to change the umask variable is through the <a href="commands.html#umask">umask function</a>. An attempt to set umask to an invalid value will always fail.
-`fish` also sends additional information to the user through the values of certain environment variables. The user cannot change the values of most of these variables.
+`fish` also sends additional information to the user through the
+values of certain environment variables. The user cannot change the
+values of most of these variables.
- `_`, the name of the currently running command.
- `argv`, an array of arguments to the shell or function. `argv` is only defined when inside a function call, or if fish was invoked with a list of arguments, like 'fish myscript.fish foo bar'. This variable can be changed by the user.
@@ -678,9 +682,19 @@ The user can change the settings of `fish` by changing the values of certain env
- `PWD`, the current working directory.
- `status`, the <a href="#variables-status">exit status</a> of the last foreground job to exit. If the job was terminated through a signal, the exit status will be 128 plus the signal number.
- `USER`, the current username. This variable can only be changed by the root user.
+- `CMD_DURATION`, the runtime of the last command in milliseconds.
+
+The names of these variables are mostly derived from the csh family of
+shells and differ from the ones used by Bourne style shells such as
+bash.
-The names of these variables are mostly derived from the csh family of shells and differ from the ones used by Bourne style shells such as bash.
-Variables whose name are in uppercase are exported to the commands started by fish, while those in lowercase are not exported. This rule is not enforced by fish, but it is good coding practice to use casing to distinguish between exported and unexported variables. `fish` also uses several variables internally. Such variables are prefixed with the string `__FISH` or `__fish`. These should never be used by the user. Changing their value may break fish.
+Variables whose name are in uppercase are exported to the commands
+started by fish, while those in lowercase are not exported. This rule is not
+enforced by fish, but it is good coding practice to use casing to
+distinguish between exported and unexported variables. `fish` also
+uses several variables internally. Such variables are prefixed with
+the string `__FISH` or `__fish`. These should never be used by the
+user. Changing their value may break fish.
\subsection variables-status The status variable
@@ -904,10 +918,9 @@ Issuing `set fish_color_error black --background=red --bold` will make all comma
\subsection title Programmable title
-When using most virtual terminals, it is possible to set the message displayed in the titlebar of the terminal window. This can be done automatically in `fish` by defining the `fish_title` function. The `fish_title` function is executed before and after a new command is executed or put into the foreground and the output is used as a titlebar message. The `$_` environment variable will always contain the name of the job to be put into the foreground (Or `fish` if control is returning to the shell) when the `fish_prompt` function is called.
-
-Example:
+When using most virtual terminals, it is possible to set the message displayed in the titlebar of the terminal window. This can be done automatically in fish by defining the `fish_title` function. The `fish_title` function is executed before and after a new command is executed or put into the foreground and the output is used as a titlebar message. The $_ environment variable will always contain the name of the job to be put into the foreground (Or 'fish' if control is returning to the shell) when the `fish_prompt` function is called. The first argument to fish_title will contain the most recently executed foreground command as a string, starting with fish 2.2.
+Examples:
The default `fish` title is
\fish
@@ -917,6 +930,14 @@ function fish_title
end
\endfish
+To show the last command in the title:
+
+\fish
+function fish_title
+ echo $argv[1]
+end
+\endfish
+
\subsection greeting Configurable greeting
If a function named `fish_greeting` exists, it will be run when entering interactive mode. Otherwise, if an environment variable named `fish_greeting` exists, it will be printed.
diff --git a/doc_src/license.hdr b/doc_src/license.hdr
index 26cdb83d..f9528b4b 100644
--- a/doc_src/license.hdr
+++ b/doc_src/license.hdr
@@ -1041,36 +1041,6 @@ HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
----
-## License for getpeereid
-
-`fish` contains code imported from the PostgreSQL project under license, namely
-the getpeereid fallback function. This code is copyrighted by:
-
-Portions Copyright © 1996-2014, PostgreSQL Global Development Group
-
-Portions Copyright © 1994, The Regents of the University of California
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose, without fee, and without a written agreement is
-hereby granted, provided that the above copyright notice and this paragraph
-and the following two paragraphs appear in all copies.
-
-IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
-DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
-LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
-EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGE.
-
-THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
-BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
-AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
-SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
-
-----
-
-
## License for UTF8
Copyright © 2007 Alexey Vatchenko \<av@bsdua.org>
diff --git a/fallback.cpp b/fallback.cpp
index 8abb8e48..d69d76f4 100644
--- a/fallback.cpp
+++ b/fallback.cpp
@@ -15,9 +15,7 @@
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
-#include <sys/socket.h>
#include <sys/stat.h>
-#include <sys/param.h>
#include <errno.h>
#include <fcntl.h>
#include <wchar.h>
@@ -1523,80 +1521,3 @@ static int mk_wcswidth(const wchar_t *pwcs, size_t n)
}
#endif // HAVE_BROKEN_WCWIDTH
-
-#ifndef HAVE_GETPEEREID
-
-/*-------------------------------------------------------------------------
- *
- * getpeereid.c
- * get peer userid for UNIX-domain socket connection
- *
- * Portions Copyright (c) 1996-2014, PostgreSQL Global Development Group
- *
- *
- * IDENTIFICATION
- * src/port/getpeereid.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-#ifdef HAVE_UCRED_H
-#include <ucred.h>
-#endif
-#ifdef HAVE_SYS_UCRED_H
-#include <sys/ucred.h>
-#endif
-
-/*
- * BSD-style getpeereid() for platforms that lack it.
- */
-int getpeereid(int sock, uid_t *uid, gid_t *gid)
-{
-#if defined(SO_PEERCRED)
- /* Linux: use getsockopt(SO_PEERCRED) */
- struct ucred peercred;
- socklen_t so_len = sizeof(peercred);
-
- if (getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &peercred, &so_len) != 0 ||
- so_len != sizeof(peercred))
- return -1;
- *uid = peercred.uid;
- *gid = peercred.gid;
- return 0;
-#elif defined(LOCAL_PEERCRED)
- /* Debian with FreeBSD kernel: use getsockopt(LOCAL_PEERCRED) */
- struct xucred peercred;
- socklen_t * so_len = sizeof(peercred);
-
- if (getsockopt(sock, 0, LOCAL_PEERCRED, &peercred, &so_len) != 0 ||
- so_len != sizeof(peercred) ||
- peercred.cr_version != XUCRED_VERSION)
- return -1;
- *uid = peercred.cr_uid;
- *gid = peercred.cr_gid;
- return 0;
-#elif defined(HAVE_GETPEERUCRED)
- /* Solaris: use getpeerucred() */
- ucred_t *ucred;
-
- ucred = NULL; /* must be initialized to NULL */
- if (getpeerucred(sock, &ucred) == -1)
- return -1;
-
- *uid = ucred_geteuid(ucred);
- *gid = ucred_getegid(ucred);
- ucred_free(ucred);
-
- if (*uid == (uid_t) (-1) || *gid == (gid_t) (-1))
- return -1;
- return 0;
-#else
- /* No implementation available on this platform */
- errno = ENOSYS;
- return -1;
-#endif
-}
-#endif // HAVE_GETPEEREID
diff --git a/fallback.h b/fallback.h
index 6898ea57..eba91be6 100644
--- a/fallback.h
+++ b/fallback.h
@@ -482,7 +482,3 @@ double nan(char *tagp);
#endif
-
-#ifndef HAVE_GETPEEREID
-int getpeereid(int sock, uid_t *uid, gid_t *gid);
-#endif
diff --git a/fish.xcodeproj/project.pbxproj b/fish.xcodeproj/project.pbxproj
index 0ed1dcd7..566a221f 100644
--- a/fish.xcodeproj/project.pbxproj
+++ b/fish.xcodeproj/project.pbxproj
@@ -55,6 +55,49 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
+ D00769121990137800CA4627 /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; };
+ D00769131990137800CA4627 /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; };
+ D00769141990137800CA4627 /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; };
+ D00769151990137800CA4627 /* common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853613B3ACEE0099B651 /* common.cpp */; };
+ D00769161990137800CA4627 /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853B13B3ACEE0099B651 /* event.cpp */; };
+ D00769171990137800CA4627 /* input_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854913B3ACEE0099B651 /* input_common.cpp */; };
+ D00769181990137800CA4627 /* io.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854C13B3ACEE0099B651 /* io.cpp */; };
+ D00769191990137800CA4627 /* iothread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854D13B3ACEE0099B651 /* iothread.cpp */; };
+ D007691A1990137800CA4627 /* parse_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855213B3ACEE0099B651 /* parse_util.cpp */; };
+ D007691B1990137800CA4627 /* path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855513B3ACEE0099B651 /* path.cpp */; };
+ D007691C1990137800CA4627 /* parse_execution.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D052D8091868F7FC003ABCBD /* parse_execution.cpp */; };
+ D007691D1990137800CA4627 /* postfork.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D09B1C1914FC7B5B00F91077 /* postfork.cpp */; };
+ D007691E1990137800CA4627 /* screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855A13B3ACEE0099B651 /* screen.cpp */; };
+ D007691F1990137800CA4627 /* signal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855C13B3ACEE0099B651 /* signal.cpp */; };
+ D00769201990137800CA4627 /* utf8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C9733718DE5449002D7C81 /* utf8.cpp */; };
+ D00769211990137800CA4627 /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853513B3ACEE0099B651 /* builtin.cpp */; };
+ D00769221990137800CA4627 /* function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854413B3ACEE0099B651 /* function.cpp */; };
+ D00769231990137800CA4627 /* complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853713B3ACEE0099B651 /* complete.cpp */; };
+ D00769241990137800CA4627 /* env.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853A13B3ACEE0099B651 /* env.cpp */; };
+ D00769251990137800CA4627 /* exec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853C13B3ACEE0099B651 /* exec.cpp */; };
+ D00769261990137800CA4627 /* expand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853D13B3ACEE0099B651 /* expand.cpp */; };
+ D00769271990137800CA4627 /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; };
+ D00769281990137800CA4627 /* highlight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854713B3ACEE0099B651 /* highlight.cpp */; };
+ D00769291990137800CA4627 /* history.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854813B3ACEE0099B651 /* history.cpp */; };
+ D007692A1990137800CA4627 /* kill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854F13B3ACEE0099B651 /* kill.cpp */; };
+ D007692B1990137800CA4627 /* parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855413B3ACEE0099B651 /* parser.cpp */; };
+ D007692C1990137800CA4627 /* parser_keywords.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855313B3ACEE0099B651 /* parser_keywords.cpp */; };
+ D007692D1990137800CA4627 /* proc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855713B3ACEE0099B651 /* proc.cpp */; };
+ D007692E1990137800CA4627 /* reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855813B3ACEE0099B651 /* reader.cpp */; };
+ D007692F1990137800CA4627 /* sanity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855913B3ACEE0099B651 /* sanity.cpp */; };
+ D00769301990137800CA4627 /* tokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855D13B3ACEE0099B651 /* tokenizer.cpp */; };
+ D00769311990137800CA4627 /* wildcard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0856013B3ACEE0099B651 /* wildcard.cpp */; };
+ D00769321990137800CA4627 /* wgetopt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855F13B3ACEE0099B651 /* wgetopt.cpp */; };
+ D00769331990137800CA4627 /* wutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0856113B3ACEE0099B651 /* wutil.cpp */; };
+ D00769341990137800CA4627 /* input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854A13B3ACEE0099B651 /* input.cpp */; };
+ D00769351990137800CA4627 /* output.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855113B3ACEE0099B651 /* output.cpp */; };
+ D00769361990137800CA4627 /* intern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854B13B3ACEE0099B651 /* intern.cpp */; };
+ D00769371990137800CA4627 /* env_universal_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */; };
+ D00769381990137800CA4627 /* pager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D03238891849D1980032CF2C /* pager.cpp */; };
+ D007693A1990137800CA4627 /* parse_tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C52F351765284C00BFAB82 /* parse_tree.cpp */; };
+ D007693B1990137800CA4627 /* parse_productions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FE8EE7179FB75F008C9F21 /* parse_productions.cpp */; };
+ D007693D1990137800CA4627 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D02A8C15983CFA008E62BD /* libncurses.dylib */; };
+ D0076943199013B900CA4627 /* fish_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854113B3ACEE0099B651 /* fish_tests.cpp */; };
D00F63F119137E9D00FCCDEC /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; };
D00F63F219137E9D00FCCDEC /* fish_version.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D00F63F019137E9D00FCCDEC /* fish_version.cpp */; };
D01A2D24169B736200767098 /* man1 in Copy Files */ = {isa = PBXBuildFile; fileRef = D01A2D23169B730A00767098 /* man1 */; };
@@ -73,45 +116,6 @@
D07D266E15E33B86009E43F6 /* tools in Copy Files */ = {isa = PBXBuildFile; fileRef = D025C02915D1FEA100B9DB63 /* tools */; };
D07D267215E34171009E43F6 /* config.fish in Copy Files */ = {isa = PBXBuildFile; fileRef = D0CBD580159EE48F0024809C /* config.fish */; };
D0879AC816BF9AAB00E98E56 /* fish_term_icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = D0879AC616BF9A1A00E98E56 /* fish_term_icon.icns */; };
- D08A329417B4458D00F3A533 /* fish_tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D08A329317B4458D00F3A533 /* fish_tests.cpp */; };
- D08A329517B445C200F3A533 /* function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854413B3ACEE0099B651 /* function.cpp */; };
- D08A329617B445FD00F3A533 /* builtin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853513B3ACEE0099B651 /* builtin.cpp */; };
- D08A329717B4463B00F3A533 /* complete.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853713B3ACEE0099B651 /* complete.cpp */; };
- D08A329817B4463B00F3A533 /* env.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853A13B3ACEE0099B651 /* env.cpp */; };
- D08A329917B4463B00F3A533 /* exec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853C13B3ACEE0099B651 /* exec.cpp */; };
- D08A329A17B4463B00F3A533 /* expand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853D13B3ACEE0099B651 /* expand.cpp */; };
- D08A329B17B4463B00F3A533 /* highlight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854713B3ACEE0099B651 /* highlight.cpp */; };
- D08A329C17B4463B00F3A533 /* history.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854813B3ACEE0099B651 /* history.cpp */; };
- D08A329D17B4463B00F3A533 /* kill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854F13B3ACEE0099B651 /* kill.cpp */; };
- D08A329E17B4463B00F3A533 /* parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855413B3ACEE0099B651 /* parser.cpp */; };
- D08A329F17B4463B00F3A533 /* proc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855713B3ACEE0099B651 /* proc.cpp */; };
- D08A32A017B4463B00F3A533 /* reader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855813B3ACEE0099B651 /* reader.cpp */; };
- D08A32A117B4463B00F3A533 /* sanity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855913B3ACEE0099B651 /* sanity.cpp */; };
- D08A32A217B4463B00F3A533 /* tokenizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855D13B3ACEE0099B651 /* tokenizer.cpp */; };
- D08A32A317B4463B00F3A533 /* wgetopt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855F13B3ACEE0099B651 /* wgetopt.cpp */; };
- D08A32A417B4463B00F3A533 /* wildcard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0856013B3ACEE0099B651 /* wildcard.cpp */; };
- D08A32A517B4463B00F3A533 /* wutil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0856113B3ACEE0099B651 /* wutil.cpp */; };
- D08A32A617B4464300F3A533 /* input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854A13B3ACEE0099B651 /* input.cpp */; };
- D08A32A717B446A300F3A533 /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; };
- D08A32A817B446A300F3A533 /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; };
- D08A32A917B446A300F3A533 /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; };
- D08A32AA17B446A300F3A533 /* common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853613B3ACEE0099B651 /* common.cpp */; };
- D08A32AB17B446A300F3A533 /* env_universal_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */; };
- D08A32AD17B446A300F3A533 /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853B13B3ACEE0099B651 /* event.cpp */; };
- D08A32AE17B446A300F3A533 /* input_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854913B3ACEE0099B651 /* input_common.cpp */; };
- D08A32AF17B446A300F3A533 /* intern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854B13B3ACEE0099B651 /* intern.cpp */; };
- D08A32B017B446A300F3A533 /* io.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854C13B3ACEE0099B651 /* io.cpp */; };
- D08A32B117B446A300F3A533 /* iothread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854D13B3ACEE0099B651 /* iothread.cpp */; };
- D08A32B217B446A300F3A533 /* output.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855113B3ACEE0099B651 /* output.cpp */; };
- D08A32B317B446A300F3A533 /* parse_util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855213B3ACEE0099B651 /* parse_util.cpp */; };
- D08A32B417B446A300F3A533 /* parser_keywords.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855313B3ACEE0099B651 /* parser_keywords.cpp */; };
- D08A32B517B446A300F3A533 /* path.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855513B3ACEE0099B651 /* path.cpp */; };
- D08A32B617B446A300F3A533 /* postfork.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D09B1C1914FC7B5B00F91077 /* postfork.cpp */; };
- D08A32B717B446A300F3A533 /* screen.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855A13B3ACEE0099B651 /* screen.cpp */; };
- D08A32B817B446A300F3A533 /* signal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855C13B3ACEE0099B651 /* signal.cpp */; };
- D08A32B917B446B100F3A533 /* parse_productions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0FE8EE7179FB75F008C9F21 /* parse_productions.cpp */; };
- D08A32BA17B446B100F3A533 /* parse_tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C52F351765284C00BFAB82 /* parse_tree.cpp */; };
- D08A32BC17B4473B00F3A533 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D0D02A8C15983CFA008E62BD /* libncurses.dylib */; };
D0A564FE168D23D800AF6161 /* man in CopyFiles */ = {isa = PBXBuildFile; fileRef = D0A564F1168D0BAB00AF6161 /* man */; };
D0A56501168D258300AF6161 /* man in Copy Files */ = {isa = PBXBuildFile; fileRef = D0A564F1168D0BAB00AF6161 /* man */; };
D0C52F371765284C00BFAB82 /* parse_tree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C52F351765284C00BFAB82 /* parse_tree.cpp */; };
@@ -282,15 +286,6 @@
name = "Copy Files";
runOnlyForDeploymentPostprocessing = 1;
};
- D08A328B17B4455100F3A533 /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = /usr/share/man/man1/;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
D0F019F015A977010034B3B1 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
@@ -325,6 +320,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ D00769421990137800CA4627 /* fish_tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fish_tests; sourceTree = BUILT_PRODUCTS_DIR; };
D00F63F019137E9D00FCCDEC /* fish_version.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fish_version.cpp; sourceTree = "<group>"; };
D01A2D23169B730A00767098 /* man1 */ = {isa = PBXFileReference; lastKnownFileType = text; name = man1; path = pages_for_manpath/man1; sourceTree = BUILT_PRODUCTS_DIR; };
D025C02715D1FEA100B9DB63 /* completions */ = {isa = PBXFileReference; lastKnownFileType = folder; name = completions; path = share/completions; sourceTree = "<group>"; };
@@ -339,8 +335,6 @@
D07B247215BCC15700D4ADB4 /* add-shell */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "add-shell"; path = "build_tools/osx_package_scripts/add-shell"; sourceTree = "<group>"; };
D07B247515BCC4BE00D4ADB4 /* install.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = install.sh; path = osx/install.sh; sourceTree = "<group>"; };
D0879AC616BF9A1A00E98E56 /* fish_term_icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = fish_term_icon.icns; path = osx/fish_term_icon.icns; sourceTree = "<group>"; };
- D08A328D17B4455100F3A533 /* fish_tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fish_tests; sourceTree = BUILT_PRODUCTS_DIR; };
- D08A329317B4458D00F3A533 /* fish_tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fish_tests.cpp; sourceTree = "<group>"; };
D09B1C1914FC7B5B00F91077 /* postfork.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = postfork.cpp; sourceTree = "<group>"; };
D09B1C1A14FC7B5B00F91077 /* postfork.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = postfork.h; sourceTree = "<group>"; };
D0A0850313B3ACEE0099B651 /* builtin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = builtin.h; sourceTree = "<group>"; };
@@ -466,11 +460,11 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
- D08A328A17B4455100F3A533 /* Frameworks */ = {
+ D007693C1990137800CA4627 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- D08A32BC17B4473B00F3A533 /* libncurses.dylib in Frameworks */,
+ D007693D1990137800CA4627 /* libncurses.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -664,7 +658,6 @@
D0A0856613B3ACEE0099B651 /* xdgmimemagic.cpp */,
D0A0852F13B3ACEE0099B651 /* xdgmimeparent.h */,
D0A0856713B3ACEE0099B651 /* xdgmimeparent.cpp */,
- D08A329317B4458D00F3A533 /* fish_tests.cpp */,
);
name = Sources;
sourceTree = "<group>";
@@ -704,7 +697,7 @@
D0D2693C159835CA005D9B9C /* fish */,
D0D02A9A15985A75008E62BD /* fish.app */,
D0D02AD01598642A008E62BD /* fish_indent */,
- D08A328D17B4455100F3A533 /* fish_tests */,
+ D00769421990137800CA4627 /* fish_tests */,
);
name = Products;
sourceTree = "<group>";
@@ -737,21 +730,20 @@
/* End PBXLegacyTarget section */
/* Begin PBXNativeTarget section */
- D08A328C17B4455100F3A533 /* fish_tests */ = {
+ D00769101990137800CA4627 /* fish_tests */ = {
isa = PBXNativeTarget;
- buildConfigurationList = D08A329217B4455100F3A533 /* Build configuration list for PBXNativeTarget "fish_tests" */;
+ buildConfigurationList = D007693E1990137800CA4627 /* Build configuration list for PBXNativeTarget "fish_tests" */;
buildPhases = (
- D08A328917B4455100F3A533 /* Sources */,
- D08A328A17B4455100F3A533 /* Frameworks */,
- D08A328B17B4455100F3A533 /* CopyFiles */,
+ D00769111990137800CA4627 /* Sources */,
+ D007693C1990137800CA4627 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = fish_tests;
- productName = fish_tests;
- productReference = D08A328D17B4455100F3A533 /* fish_tests */;
+ productName = fish_Xcode;
+ productReference = D00769421990137800CA4627 /* fish_tests */;
productType = "com.apple.product-type.tool";
};
D0D02A9915985A75008E62BD /* fish.app */ = {
@@ -829,9 +821,9 @@
D0D02A9915985A75008E62BD /* fish.app */,
D0D2693B159835CA005D9B9C /* fish_shell */,
D0D02ACF1598642A008E62BD /* fish_indent */,
- D08A328C17B4455100F3A533 /* fish_tests */,
D0A564E6168CFDD800AF6161 /* man_pages */,
D0A084F713B3AC130099B651 /* Makefile */,
+ D00769101990137800CA4627 /* fish_tests */,
);
};
/* End PBXProject section */
@@ -1008,48 +1000,52 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
- D08A328917B4455100F3A533 /* Sources */ = {
+ D00769111990137800CA4627 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- D08A32B917B446B100F3A533 /* parse_productions.cpp in Sources */,
- D08A32BA17B446B100F3A533 /* parse_tree.cpp in Sources */,
- D08A32A717B446A300F3A533 /* autoload.cpp in Sources */,
- D08A32A817B446A300F3A533 /* builtin_test.cpp in Sources */,
- D08A32A917B446A300F3A533 /* color.cpp in Sources */,
- D08A32AA17B446A300F3A533 /* common.cpp in Sources */,
- D08A32AB17B446A300F3A533 /* env_universal_common.cpp in Sources */,
- D08A32AD17B446A300F3A533 /* event.cpp in Sources */,
- D08A32AE17B446A300F3A533 /* input_common.cpp in Sources */,
- D08A32AF17B446A300F3A533 /* intern.cpp in Sources */,
- D08A32B017B446A300F3A533 /* io.cpp in Sources */,
- D08A32B117B446A300F3A533 /* iothread.cpp in Sources */,
- D08A32B217B446A300F3A533 /* output.cpp in Sources */,
- D08A32B317B446A300F3A533 /* parse_util.cpp in Sources */,
- D08A32B417B446A300F3A533 /* parser_keywords.cpp in Sources */,
- D08A32B517B446A300F3A533 /* path.cpp in Sources */,
- D08A32B617B446A300F3A533 /* postfork.cpp in Sources */,
- D08A32B717B446A300F3A533 /* screen.cpp in Sources */,
- D08A32B817B446A300F3A533 /* signal.cpp in Sources */,
- D08A32A617B4464300F3A533 /* input.cpp in Sources */,
- D08A329717B4463B00F3A533 /* complete.cpp in Sources */,
- D08A329817B4463B00F3A533 /* env.cpp in Sources */,
- D08A329917B4463B00F3A533 /* exec.cpp in Sources */,
- D08A329A17B4463B00F3A533 /* expand.cpp in Sources */,
- D08A329B17B4463B00F3A533 /* highlight.cpp in Sources */,
- D08A329C17B4463B00F3A533 /* history.cpp in Sources */,
- D08A329D17B4463B00F3A533 /* kill.cpp in Sources */,
- D08A329E17B4463B00F3A533 /* parser.cpp in Sources */,
- D08A329F17B4463B00F3A533 /* proc.cpp in Sources */,
- D08A32A017B4463B00F3A533 /* reader.cpp in Sources */,
- D08A32A117B4463B00F3A533 /* sanity.cpp in Sources */,
- D08A32A217B4463B00F3A533 /* tokenizer.cpp in Sources */,
- D08A32A317B4463B00F3A533 /* wgetopt.cpp in Sources */,
- D08A32A417B4463B00F3A533 /* wildcard.cpp in Sources */,
- D08A32A517B4463B00F3A533 /* wutil.cpp in Sources */,
- D08A329617B445FD00F3A533 /* builtin.cpp in Sources */,
- D08A329417B4458D00F3A533 /* fish_tests.cpp in Sources */,
- D08A329517B445C200F3A533 /* function.cpp in Sources */,
+ D00769121990137800CA4627 /* autoload.cpp in Sources */,
+ D00769131990137800CA4627 /* builtin_test.cpp in Sources */,
+ D00769141990137800CA4627 /* color.cpp in Sources */,
+ D00769151990137800CA4627 /* common.cpp in Sources */,
+ D00769161990137800CA4627 /* event.cpp in Sources */,
+ D00769171990137800CA4627 /* input_common.cpp in Sources */,
+ D00769181990137800CA4627 /* io.cpp in Sources */,
+ D00769191990137800CA4627 /* iothread.cpp in Sources */,
+ D007691A1990137800CA4627 /* parse_util.cpp in Sources */,
+ D007691B1990137800CA4627 /* path.cpp in Sources */,
+ D007691C1990137800CA4627 /* parse_execution.cpp in Sources */,
+ D007691D1990137800CA4627 /* postfork.cpp in Sources */,
+ D007691E1990137800CA4627 /* screen.cpp in Sources */,
+ D007691F1990137800CA4627 /* signal.cpp in Sources */,
+ D00769201990137800CA4627 /* utf8.cpp in Sources */,
+ D00769211990137800CA4627 /* builtin.cpp in Sources */,
+ D00769221990137800CA4627 /* function.cpp in Sources */,
+ D00769231990137800CA4627 /* complete.cpp in Sources */,
+ D00769241990137800CA4627 /* env.cpp in Sources */,
+ D00769251990137800CA4627 /* exec.cpp in Sources */,
+ D00769261990137800CA4627 /* expand.cpp in Sources */,
+ D00769271990137800CA4627 /* fish_version.cpp in Sources */,
+ D00769281990137800CA4627 /* highlight.cpp in Sources */,
+ D00769291990137800CA4627 /* history.cpp in Sources */,
+ D007692A1990137800CA4627 /* kill.cpp in Sources */,
+ D007692B1990137800CA4627 /* parser.cpp in Sources */,
+ D007692C1990137800CA4627 /* parser_keywords.cpp in Sources */,
+ D007692D1990137800CA4627 /* proc.cpp in Sources */,
+ D007692E1990137800CA4627 /* reader.cpp in Sources */,
+ D007692F1990137800CA4627 /* sanity.cpp in Sources */,
+ D00769301990137800CA4627 /* tokenizer.cpp in Sources */,
+ D00769311990137800CA4627 /* wildcard.cpp in Sources */,
+ D00769321990137800CA4627 /* wgetopt.cpp in Sources */,
+ D00769331990137800CA4627 /* wutil.cpp in Sources */,
+ D00769341990137800CA4627 /* input.cpp in Sources */,
+ D00769351990137800CA4627 /* output.cpp in Sources */,
+ D00769361990137800CA4627 /* intern.cpp in Sources */,
+ D00769371990137800CA4627 /* env_universal_common.cpp in Sources */,
+ D00769381990137800CA4627 /* pager.cpp in Sources */,
+ D007693A1990137800CA4627 /* parse_tree.cpp in Sources */,
+ D007693B1990137800CA4627 /* parse_productions.cpp in Sources */,
+ D0076943199013B900CA4627 /* fish_tests.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1165,6 +1161,42 @@
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
+ D007693F1990137800CA4627 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ PRODUCT_NAME = fish_tests;
+ };
+ name = Debug;
+ };
+ D00769401990137800CA4627 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ PRODUCT_NAME = fish_tests;
+ };
+ name = Release;
+ };
+ D00769411990137800CA4627 /* Release_C++11 */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ PRODUCT_NAME = fish_tests;
+ };
+ name = "Release_C++11";
+ };
D007FDDA17136EAA00A52BE6 /* Release_C++11 */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1295,71 +1327,6 @@
};
name = Release;
};
- D08A328F17B4455100F3A533 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = NO;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.8;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- };
- D08A329017B4455100F3A533 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.8;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- };
- D08A329117B4455100F3A533 /* Release_C++11 */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- COPY_PHASE_STRIP = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_ENABLE_OBJC_EXCEPTIONS = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.8;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = "Release_C++11";
- };
D0A084F813B3AC130099B651 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1572,22 +1539,22 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- D07D266F15E33B86009E43F6 /* Build configuration list for PBXAggregateTarget "install_tree" */ = {
+ D007693E1990137800CA4627 /* Build configuration list for PBXNativeTarget "fish_tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- D07D267015E33B86009E43F6 /* Debug */,
- D07D267115E33B86009E43F6 /* Release */,
- D007FDDB17136EAA00A52BE6 /* Release_C++11 */,
+ D007693F1990137800CA4627 /* Debug */,
+ D00769401990137800CA4627 /* Release */,
+ D00769411990137800CA4627 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- D08A329217B4455100F3A533 /* Build configuration list for PBXNativeTarget "fish_tests" */ = {
+ D07D266F15E33B86009E43F6 /* Build configuration list for PBXAggregateTarget "install_tree" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- D08A328F17B4455100F3A533 /* Debug */,
- D08A329017B4455100F3A533 /* Release */,
- D08A329117B4455100F3A533 /* Release_C++11 */,
+ D07D267015E33B86009E43F6 /* Debug */,
+ D07D267115E33B86009E43F6 /* Release */,
+ D007FDDB17136EAA00A52BE6 /* Release_C++11 */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
diff --git a/fish.xcodeproj/xcshareddata/xcschemes/fish_tests.xcscheme b/fish.xcodeproj/xcshareddata/xcschemes/fish_tests.xcscheme
new file mode 100644
index 00000000..0cb68e5a
--- /dev/null
+++ b/fish.xcodeproj/xcshareddata/xcschemes/fish_tests.xcscheme
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0510"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D00769101990137800CA4627"
+ BuildableName = "fish_tests"
+ BlueprintName = "fish_tests"
+ ReferencedContainer = "container:fish.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D00769101990137800CA4627"
+ BuildableName = "fish_tests"
+ BlueprintName = "fish_tests"
+ ReferencedContainer = "container:fish.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D00769101990137800CA4627"
+ BuildableName = "fish_tests"
+ BlueprintName = "fish_tests"
+ ReferencedContainer = "container:fish.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <EnvironmentVariables>
+ <EnvironmentVariable
+ key = "RUNNING_IN_XCODE"
+ value = "1"
+ isEnabled = "YES">
+ </EnvironmentVariable>
+ </EnvironmentVariables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D00769101990137800CA4627"
+ BuildableName = "fish_tests"
+ BlueprintName = "fish_tests"
+ ReferencedContainer = "container:fish.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/fish_tests.cpp b/fish_tests.cpp
index 08ab8477..96093154 100644
--- a/fish_tests.cpp
+++ b/fish_tests.cpp
@@ -18,6 +18,7 @@
#include <sys/wait.h>
#include <fcntl.h>
#include <stdarg.h>
+#include <libgen.h>
#include <iostream>
#include <string>
#include <sstream>
@@ -732,6 +733,10 @@ static void test_1_cancellation(const wchar_t *src)
static void test_cancellation()
{
+ if (getenv("RUNNING_IN_XCODE")) {
+ say(L"Skipping Ctrl-C cancellation test because we are running in Xcode debugger");
+ return;
+ }
say(L"Testing Ctrl-C cancellation. If this hangs, that's a bug!");
/* Enable fish's signal handling here. We need to make this interactive for fish to install its signal handlers */
@@ -3516,6 +3521,23 @@ static void test_highlighting(void)
*/
int main(int argc, char **argv)
{
+ // Look for the file tests/test.fish. We expect to run in a directory containing that file.
+ // If we don't find it, walk up the directory hierarchy until we do, or error
+ while (access("./tests/test.fish", F_OK) != 0)
+ {
+ char wd[PATH_MAX + 1] = {};
+ getcwd(wd, sizeof wd);
+ if (! strcmp(wd, "/"))
+ {
+ fprintf(stderr, "Unable to find 'tests' directory, which should contain file test.fish\n");
+ exit(EXIT_FAILURE);
+ }
+ if (chdir(dirname(wd)) < 0)
+ {
+ perror("chdir");
+ }
+ }
+
setlocale(LC_ALL, "");
//srand(time(0));
configure_thread_assertions_for_testing();
diff --git a/osx/config.h b/osx/config.h
index 1db2e52c..99f83742 100644
--- a/osx/config.h
+++ b/osx/config.h
@@ -40,12 +40,6 @@
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
-/* Define to 1 if you have the `getpeereid' function. */
-#define HAVE_GETPEEREID 1
-
-/* Define to 1 if you have the `getpeerucred' function. */
-/* #undef HAVE_GETPEERUCRED */
-
/* Define to 1 if you have the `gettext' function. */
/* #undef HAVE_GETTEXT */
diff --git a/reader.cpp b/reader.cpp
index 44a219d5..057ab706 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -902,9 +902,8 @@ bool reader_thread_job_is_stale()
return (void*)(uintptr_t) s_generation_count != pthread_getspecific(generation_count_key);
}
-void reader_write_title()
+void reader_write_title(const wcstring &cmd)
{
- const wchar_t *title;
const env_var_t term_str = env_get_string(L"TERM");
/*
@@ -934,7 +933,6 @@ void reader_write_title()
{
char *n = ttyname(STDIN_FILENO);
-
if (contains(term, L"linux"))
{
return;
@@ -942,19 +940,23 @@ void reader_write_title()
if (strstr(n, "tty") || strstr(n, "/vc/"))
return;
-
-
}
- title = function_exists(L"fish_title")?L"fish_title":DEFAULT_TITLE;
-
- if (wcslen(title) ==0)
- return;
+ wcstring fish_title_command = DEFAULT_TITLE;
+ if (function_exists(L"fish_title"))
+ {
+ fish_title_command = L"fish_title";
+ if (! cmd.empty())
+ {
+ fish_title_command.append(L" ");
+ fish_title_command.append(parse_util_escape_string_with_quote(cmd, L'\0'));
+ }
+ }
wcstring_list_t lst;
proc_push_interactive(0);
- if (exec_subshell(title, lst, false /* do not apply exit status */) != -1)
+ if (exec_subshell(fish_title_command, lst, false /* do not apply exit status */) != -1)
{
if (! lst.empty())
{
@@ -1015,7 +1017,7 @@ static void exec_prompt()
}
/* Write the screen title */
- reader_write_title();
+ reader_write_title(L"");
}
void reader_init()
@@ -2495,34 +2497,8 @@ void set_env_cmd_duration(struct timeval *after, struct timeval *before)
secs -= 1;
}
- if (secs < 1)
- {
- env_remove(ENV_CMD_DURATION, 0);
- }
- else
- {
- if (secs < 10) // 10 secs
- {
- swprintf(buf, 16, L"%lu.%02us", secs, usecs / 10000);
- }
- else if (secs < 60) // 1 min
- {
- swprintf(buf, 16, L"%lu.%01us", secs, usecs / 100000);
- }
- else if (secs < 600) // 10 mins
- {
- swprintf(buf, 16, L"%lum %lu.%01us", secs / 60, secs % 60, usecs / 100000);
- }
- else if (secs < 5400) // 1.5 hours
- {
- swprintf(buf, 16, L"%lum %lus", secs / 60, secs % 60);
- }
- else
- {
- swprintf(buf, 16, L"%.1fh", secs / 3600.0);
- }
- env_set(ENV_CMD_DURATION, buf, ENV_EXPORT);
- }
+ swprintf(buf, 16, L"%d", (secs * 1000) + (usecs / 1000));
+ env_set(ENV_CMD_DURATION, buf, ENV_EXPORT);
}
void reader_run_command(parser_t &parser, const wcstring &cmd)
@@ -2535,7 +2511,7 @@ void reader_run_command(parser_t &parser, const wcstring &cmd)
if (! ft.empty())
env_set(L"_", ft.c_str(), ENV_GLOBAL);
- reader_write_title();
+ reader_write_title(cmd);
term_donate();
diff --git a/reader.h b/reader.h
index 3375851a..f89bd50e 100644
--- a/reader.h
+++ b/reader.h
@@ -116,8 +116,10 @@ void reader_pop_current_filename();
Write the title to the titlebar. This function is called just
before a new application starts executing and just after it
finishes.
+
+ \param cmd Command line string passed to \c fish_title if is defined.
*/
-void reader_write_title();
+void reader_write_title(const wcstring &cmd);
/**
Call this function to tell the reader that a repaint is needed, and
diff --git a/share/completions/grunt.fish b/share/completions/grunt.fish
index 145801ff..f02578ea 100644
--- a/share/completions/grunt.fish
+++ b/share/completions/grunt.fish
@@ -8,8 +8,7 @@
# https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
function __grunt_print_tasks
- set -l info (grunt --version --verbose ^/dev/null)
- set -l tasks (echo $info[4] | sed -e 's/Available tasks: //' | tr ' ' '\n')
+ set -l tasks (grunt --version --verbose ^/dev/null | awk '/Available tasks: / {$1=$2=""; print $0}' | awk '{$1=$1}1' | tr ' ' '\n')
for t in $tasks
echo $t
end
diff --git a/share/tools/web_config/js/controllers.js b/share/tools/web_config/js/controllers.js
index 7db84a35..cc4452b5 100644
--- a/share/tools/web_config/js/controllers.js
+++ b/share/tools/web_config/js/controllers.js
@@ -83,7 +83,7 @@ controllers.controller("colorsController", function($scope, $http) {
$scope.getCurrentTheme = function() {
- $http.get("/colors/").success(function(data, status, headers, config) {
+ $http.get("colors/").success(function(data, status, headers, config) {
var currentScheme = { "name": "Current", "colors":[], "preferred_background": "" };
for (var i in data) {
currentScheme[data[i].name] = data[i].color;
@@ -103,7 +103,7 @@ controllers.controller("colorsController", function($scope, $http) {
var remaining = settingNames.length;
for (name in settingNames) {
var postData = "what=" + settingNames[name] + "&color=" + $scope.selectedColorScheme[settingNames[name]] + "&background_color=&bold=&underline=";
- $http.post("/set_color/", postData, { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config) {
+ $http.post("set_color/", postData, { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config) {
if (status == 200) {
remaining -= 1;
if (remaining == 0) {
@@ -124,7 +124,7 @@ controllers.controller("promptController", function($scope, $http) {
$scope.savePromptButtonTitle = "Set Prompt";
$scope.fetchSamplePrompts= function() {
- $http.get("/sample_prompts/").success(function(data, status, headers, config) {
+ $http.get("sample_prompts/").success(function(data, status, headers, config) {
$scope.samplePrompts = data;
$scope.samplePromptsArrayArray = get_colors_as_nested_array($scope.samplePrompts, 1);
@@ -140,7 +140,7 @@ controllers.controller("promptController", function($scope, $http) {
}
$scope.setNewPrompt = function(selectedPrompt) {
- $http.post("/set_prompt/","what=" + encodeURIComponent(selectedPrompt.function), { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config){
+ $http.post("set_prompt/","what=" + encodeURIComponent(selectedPrompt.function), { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config){
// Update attributes of current prompt and select it
$scope.samplePrompts[0].demo = selectedPrompt.demo;
@@ -171,7 +171,7 @@ controllers.controller("functionsController", function($scope, $http) {
}
$scope.fetchFunctions= function() {
- $http.get("/functions/").success(function(data, status, headers, config) {
+ $http.get("functions/").success(function(data, status, headers, config) {
$scope.functions = data;
$scope.selectFunction($scope.functions[0]);
})};
@@ -195,7 +195,7 @@ controllers.controller("functionsController", function($scope, $http) {
}
$scope.fetchFunctionDefinition = function(name) {
- $http.post("/get_function/","what=" + name, { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config) {
+ $http.post("get_function/","what=" + name, { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config) {
$scope.functionDefinition = $scope.cleanupFishFunction(data[0]);
})};
@@ -206,7 +206,7 @@ controllers.controller("variablesController", function($scope, $http) {
$scope.query = null;
$scope.fetchVariables= function() {
- $http.get("/variables/").success(function(data, status, headers, config) {
+ $http.get("variables/").success(function(data, status, headers, config) {
$scope.variables = data;
})};
@@ -247,7 +247,7 @@ controllers.controller("historyController", function($scope, $http, $timeout) {
}
// Get history from server
$scope.fetchHistory = function() {
- $http.get("/history/").success(function(data, status, headers, config) {
+ $http.get("history/").success(function(data, status, headers, config) {
$scope.historySize = data.length;
$scope.remainingItems = data;
@@ -257,7 +257,7 @@ controllers.controller("historyController", function($scope, $http, $timeout) {
$scope.deleteHistoryItem = function(item) {
index = $scope.historyItems.indexOf(item);
- $http.post("/delete_history_item/","what=" + encodeURIComponent(item), { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config) {
+ $http.post("delete_history_item/","what=" + encodeURIComponent(item), { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config) {
$scope.historyItems.splice(index, 1);
})};
@@ -278,7 +278,7 @@ controllers.controller("historyController", function($scope, $http, $timeout) {
controllers.controller("bindingsController", function($scope, $http) {
$scope.bindings = [];
$scope.fetchBindings = function() {
- $http.get("/bindings/").success(function(data, status, headers, config) {
+ $http.get("bindings/").success(function(data, status, headers, config) {
$scope.bindings = data;
})};
diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py
index c3daef5f..55ab372e 100755
--- a/share/tools/web_config/webconfig.py
+++ b/share/tools/web_config/webconfig.py
@@ -26,7 +26,7 @@ if term:
os.environ['TERM'] = term
import subprocess
-import re, socket, cgi, select, time, glob
+import re, socket, cgi, select, time, glob, random, string
try:
import json
except ImportError:
@@ -693,9 +693,16 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
else: font_size = '18pt'
return font_size
-
def do_GET(self):
p = self.path
+
+ authpath = '/' + authkey
+ if p.startswith(authpath):
+ p = p[len(authpath):]
+ else:
+ return self.send_error(403)
+ self.path = p
+
if p == '/colors/':
output = self.do_get_colors()
elif p == '/functions/':
@@ -727,6 +734,14 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_POST(self):
p = self.path
+
+ authpath = '/' + authkey
+ if p.startswith(authpath):
+ p = p[len(authpath):]
+ else:
+ return self.send_error(403)
+ self.path = p
+
if IS_PY2:
ctype, pdict = cgi.parse_header(self.headers.getheader('content-type'))
else: # Python 3
@@ -788,6 +803,18 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
""" Disable request logging """
pass
+redirect_template_html = """
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0;URL='%s'" />
+ </head>
+ <body>
+ <p><a href="%s">Start the Fish Web config</a></p>
+ </body>
+</html>
+"""
+
# find fish
fish_bin_dir = os.environ.get('__fish_bin_dir')
fish_bin_path = None
@@ -823,6 +850,9 @@ initial_wd = os.getcwd()
where = os.path.dirname(sys.argv[0])
os.chdir(where)
+# Generate a 16-byte random key as a hexadecimal string
+authkey = hex(random.getrandbits(16*4))[2:]
+
# Try to find a suitable port
PORT = 8000
while PORT <= 9000:
@@ -852,9 +882,36 @@ if len(sys.argv) > 1:
initial_tab = '#' + tab
break
-url = 'http://localhost:%d/%s' % (PORT, initial_tab)
-print("Web config started at '%s'. Hit enter to stop." % url)
-webbrowser.open(url)
+url = 'http://localhost:%d/%s/%s' % (PORT, authkey, initial_tab)
+
+# Create temporary file to hold redirect to real server
+# This prevents exposing the URL containing the authentication key on the command line
+# (see CVE-2014-2914 or https://github.com/fish-shell/fish-shell/issues/1438)
+if 'XDG_CACHE_HOME' in os.environ:
+ dirname = os.path.expanduser(os.path.expandvars('$XDG_CACHE_HOME/fish/'))
+else:
+ dirname = os.path.expanduser('~/.cache/fish/')
+
+os.umask(0o0077)
+try:
+ os.makedirs(dirname, 0o0700)
+except OSError as e:
+ if e.errno == 17:
+ pass
+ else:
+ raise e
+
+randtoken = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(6))
+filename = dirname + 'web_config-%s.html' % randtoken
+
+f = open(filename, 'w')
+f.write(redirect_template_html % (url, url))
+f.close()
+
+# Open temporary file as URL
+fileurl = 'file://' + filename
+print("Web config started at '%s'. Hit enter to stop." % fileurl)
+webbrowser.open(fileurl)
# Select on stdin and httpd
stdin_no = sys.stdin.fileno()
@@ -871,3 +928,5 @@ try:
except KeyboardInterrupt:
print("\nShutting down.")
+# Clean up temporary file
+os.remove(filename)