aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbuild_tools/make_pkg.sh7
-rw-r--r--builtin.cpp6
-rw-r--r--fallback.cpp22
-rw-r--r--fish.xcodeproj/project.pbxproj6
-rw-r--r--function.cpp5
-rw-r--r--function.h3
-rw-r--r--osx/config.h4
-rw-r--r--parse_util.cpp6
-rw-r--r--user_doc.head.html1
9 files changed, 38 insertions, 22 deletions
diff --git a/build_tools/make_pkg.sh b/build_tools/make_pkg.sh
index 2fb452ea..1b041bdc 100755
--- a/build_tools/make_pkg.sh
+++ b/build_tools/make_pkg.sh
@@ -21,3 +21,10 @@ xcodebuild install -scheme install_tree -configuration Release DSTROOT=/tmp/fish
pkgbuild --scripts build_tools/osx_package_scripts --root /tmp/fish_pkg/root/ --identifier 'com.ridiculousfish.fish-shell-pkg' --version "$VERSION" /tmp/fish_pkg/intermediates/fish.pkg
productbuild --package-path /tmp/fish_pkg/intermediates --distribution build_tools/osx_distribution.xml --resources build_tools/osx_package_resources/ ~/fish_built/fish.pkg
+
+
+# Make the app
+xcodebuild -scheme fish.app -configuration Release DSTROOT=/tmp/fish_app/
+rm -f ~/fish_built/fish.app.zip
+cd DerivedData/fish/Build/Products/Release/
+zip -r ~/fish_built/fish.app.zip fish.app
diff --git a/builtin.cpp b/builtin.cpp
index 6e669e69..a783828e 100644
--- a/builtin.cpp
+++ b/builtin.cpp
@@ -1116,7 +1116,7 @@ static void functions_def(const wcstring &name, wcstring &out)
bool defer_function_name = (name.at(0) == L'-');
if (! defer_function_name)
{
- out.append(name);
+ out.append(escape_string(name, true));
}
if (! desc.empty())
@@ -1190,7 +1190,7 @@ static void functions_def(const wcstring &name, wcstring &out)
if (defer_function_name)
{
out.append(L" -- ");
- out.append(name);
+ out.append(escape_string(name, true));
}
/* This forced tab is sort of crummy - not all functions start with a tab */
@@ -1340,7 +1340,7 @@ static int builtin_functions(parser_t &parser, wchar_t **argv)
{
int i;
for (i=woptind; i<argc; i++)
- function_remove(argv[i]);
+ function_remove_ignore_autoload(argv[i]);
return STATUS_BUILTIN_OK;
}
else if (desc)
diff --git a/fallback.cpp b/fallback.cpp
index 7e215bbe..5e4b3e1b 100644
--- a/fallback.cpp
+++ b/fallback.cpp
@@ -1503,14 +1503,20 @@ static int mk_wcwidth(wchar_t ucs)
static int mk_wcswidth(const wchar_t *pwcs, size_t n)
{
- int w, width = 0;
-
- for (; *pwcs && n-- > 0; pwcs++)
- if ((w = mk_wcwidth(*pwcs)) < 0)
- return -1;
- else
- width += w;
-
+ int width = 0;
+ for (size_t i=0; i < n; i++)
+ {
+ if (pwcs[i] == L'\0')
+ break;
+
+ int w = mk_wcwidth(pwcs[i]);
+ if (w < 0)
+ {
+ width = -1;
+ break;
+ }
+ width += w;
+ }
return width;
}
diff --git a/fish.xcodeproj/project.pbxproj b/fish.xcodeproj/project.pbxproj
index 04d0c7cb..4bbf5677 100644
--- a/fish.xcodeproj/project.pbxproj
+++ b/fish.xcodeproj/project.pbxproj
@@ -1337,7 +1337,7 @@
"DATADIR=L\\\"/usr/local/share\\\"",
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
"BINDIR=L\\\"/usr/local/bin\\\"",
- "FISH_BUILD_VERSION=\\\"2.0.0\\\"",
+ "FISH_BUILD_VERSION=\\\"2.1.0\\\"",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -1557,7 +1557,7 @@
"DATADIR=L\\\"/usr/local/share\\\"",
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
"BINDIR=L\\\"/usr/local/bin\\\"",
- "FISH_BUILD_VERSION=\\\"2.0.0\\\"",
+ "FISH_BUILD_VERSION=\\\"2.1.0\\\"",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
@@ -1585,7 +1585,7 @@
"DATADIR=L\\\"/usr/local/share\\\"",
"SYSCONFDIR=L\\\"/usr/local/etc\\\"",
"BINDIR=L\\\"/usr/local/bin\\\"",
- "FISH_BUILD_VERSION=\\\"2.0.0\\\"",
+ "FISH_BUILD_VERSION=\\\"2.1.0\\\"",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
diff --git a/function.cpp b/function.cpp
index fef34272..5e75b3ba 100644
--- a/function.cpp
+++ b/function.cpp
@@ -61,9 +61,6 @@ function_autoload_t::function_autoload_t() : autoload_t(L"fish_function_path", N
{
}
-/** Removes a function from our internal table, returning true if it was found and false if not */
-static bool function_remove_ignore_autoload(const wcstring &name);
-
/** Callback when an autoloaded function is removed */
void function_autoload_t::command_removed(const wcstring &cmd)
{
@@ -226,7 +223,7 @@ int function_exists_no_autoload(const wcstring &cmd, const env_vars_snapshot_t &
return loaded_functions.find(cmd) != loaded_functions.end() || function_autoloader.can_load(cmd, vars);
}
-static bool function_remove_ignore_autoload(const wcstring &name)
+bool function_remove_ignore_autoload(const wcstring &name)
{
scoped_lock lock(functions_lock);
bool erased = (loaded_functions.erase(name) > 0);
diff --git a/function.h b/function.h
index fd945570..847c818b 100644
--- a/function.h
+++ b/function.h
@@ -95,6 +95,9 @@ void function_init();
/** Add a function. */
void function_add(const function_data_t &data, const parser_t &parser);
+/** Removes a function from our internal table, returning true if it was found and false if not */
+bool function_remove_ignore_autoload(const wcstring &name);
+
/**
Remove the function with the specified name.
*/
diff --git a/osx/config.h b/osx/config.h
index 9872a2e1..4968a78b 100644
--- a/osx/config.h
+++ b/osx/config.h
@@ -183,7 +183,7 @@
#define PACKAGE_NAME "fish"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "fish 2.0.0"
+#define PACKAGE_STRING "fish 2.1.0"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "fish"
@@ -192,7 +192,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.0.0"
+#define PACKAGE_VERSION "2.1.0"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
diff --git a/parse_util.cpp b/parse_util.cpp
index 6427e249..df55e444 100644
--- a/parse_util.cpp
+++ b/parse_util.cpp
@@ -296,8 +296,7 @@ void parse_util_cmdsubst_extent(const wchar_t *buff, size_t cursor_pos, const wc
/* No subshell found, all done */
break;
}
-
- /* Intrepret NULL to mean the end */
+ /* Interpret NULL to mean the end */
if (end == NULL)
{
end = const_cast<wchar_t *>(buff) + bufflen;
@@ -309,6 +308,9 @@ void parse_util_cmdsubst_extent(const wchar_t *buff, size_t cursor_pos, const wc
begin++;
ap = begin;
bp = end;
+ /* pos is where to begin looking for the next one. But if we reached the end there's no next one. */
+ if (begin >= end)
+ break;
pos = begin + 1;
}
else if (begin >= cursor)
diff --git a/user_doc.head.html b/user_doc.head.html
index 958a9691..eae673f5 100644
--- a/user_doc.head.html
+++ b/user_doc.head.html
@@ -19,6 +19,7 @@ body
top: 36px;
bottom: 0;
overflow-y: scroll;
+ -webkit-overflow-scrolling: touch; /* necessary for momentum scrolling */
}
.fish_left_bar