mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-10 09:41:16 -03:00
Compare commits
3 Commits
Integratio
...
Integratio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28f57aa8ab | ||
|
|
6e24061468 | ||
|
|
5c994b0d47 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
|||||||
|
# fish 3.0.2 (released February 19, 2019)
|
||||||
|
|
||||||
|
This release of fish fixes an issue discovered in fish 3.0.1.
|
||||||
|
|
||||||
|
### Fixes and improvements
|
||||||
|
|
||||||
|
- The PWD environment variable is now ignored if it does not resolve to the true working directory, fixing strange behaviour in terminals started by editors and IDEs (#5647).
|
||||||
|
|
||||||
|
If you are upgrading from version 2.7.1 or before, please also review the release notes for 3.0.1, 3.0.0 and 3.0b1 (included below).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# fish 3.0.1 (released February 11, 2019)
|
# fish 3.0.1 (released February 11, 2019)
|
||||||
|
|
||||||
This release of fish fixes a number of major issues discovered in fish 3.0.0.
|
This release of fish fixes a number of major issues discovered in fish 3.0.0.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>3.0.1</string>
|
<string>3.0.2</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>0.1</string>
|
<string>0.1</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
|
|||||||
@@ -209,7 +209,7 @@
|
|||||||
#define PACKAGE_NAME "fish"
|
#define PACKAGE_NAME "fish"
|
||||||
|
|
||||||
/* Define to the full name and version of this package. */
|
/* Define to the full name and version of this package. */
|
||||||
#define PACKAGE_STRING "fish 3.0.1"
|
#define PACKAGE_STRING "fish 3.0.2"
|
||||||
|
|
||||||
/* Define to the one symbol short name of this package. */
|
/* Define to the one symbol short name of this package. */
|
||||||
#define PACKAGE_TARNAME "fish"
|
#define PACKAGE_TARNAME "fish"
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
#define PACKAGE_URL ""
|
#define PACKAGE_URL ""
|
||||||
|
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#define PACKAGE_VERSION "3.0.1"
|
#define PACKAGE_VERSION "3.0.2"
|
||||||
|
|
||||||
/* The size of `wchar_t', as computed by sizeof. */
|
/* The size of `wchar_t', as computed by sizeof. */
|
||||||
#define SIZEOF_WCHAR_T 4
|
#define SIZEOF_WCHAR_T 4
|
||||||
|
|||||||
13
src/env.cpp
13
src/env.cpp
@@ -960,12 +960,13 @@ void env_init(const struct config_paths_t *paths /* or NULL */) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize the PWD variable if necessary
|
// Note we may inherit a virtual PWD that doesn't match what getcwd would return; respect that
|
||||||
// Note we may inherit a virtual PWD that doesn't match what getcwd would return; respect that.
|
// if and only if it matches getcwd (#5647). Note we treat PWD as read-only so it was not set in
|
||||||
// Note we treat PWD as read-only so it was not set in vars.
|
// vars.
|
||||||
const char *incoming_pwd = getenv("PWD");
|
const char *incoming_pwd_cstr = getenv("PWD");
|
||||||
if (incoming_pwd && incoming_pwd[0]) {
|
wcstring incoming_pwd = incoming_pwd_cstr ? str2wcstring(incoming_pwd_cstr) : wcstring{};
|
||||||
env_set_one(L"PWD", ENV_EXPORT | ENV_GLOBAL, str2wcstring(incoming_pwd));
|
if (!incoming_pwd.empty() && paths_are_same_file(incoming_pwd, L".")) {
|
||||||
|
env_set_one(L"PWD", ENV_EXPORT | ENV_GLOBAL, std::move(incoming_pwd));
|
||||||
} else {
|
} else {
|
||||||
env_set_pwd_from_getcwd();
|
env_set_pwd_from_getcwd();
|
||||||
}
|
}
|
||||||
|
|||||||
14
tests/cd.in
14
tests/cd.in
@@ -46,8 +46,22 @@ mkdir -p $base/realhome
|
|||||||
set fish_path $PWD/../test/root/bin/fish
|
set fish_path $PWD/../test/root/bin/fish
|
||||||
ln -s $base/realhome $base/linkhome
|
ln -s $base/realhome $base/linkhome
|
||||||
cd $base/linkhome
|
cd $base/linkhome
|
||||||
|
set -l real_getcwd (pwd -P)
|
||||||
env HOME=$base/linkhome $fish_path -c 'echo PWD is $PWD'
|
env HOME=$base/linkhome $fish_path -c 'echo PWD is $PWD'
|
||||||
|
|
||||||
|
# Do not inherit a virtual PWD that fails to resolve to getcwd (#5647)
|
||||||
|
|
||||||
|
env HOME=$base/linkhome PWD=/tmp $fish_path -c 'echo $PWD' | read output_pwd
|
||||||
|
test (realpath $output_pwd) = $real_getcwd
|
||||||
|
and echo "BogusPWD test 1 succeeded"
|
||||||
|
or echo "BogusPWD test 1 failed: $output_pwd vs $real_getcwd"
|
||||||
|
|
||||||
|
env HOME=$base/linkhome PWD=/path/to/nowhere $fish_path -c 'echo $PWD' | read output_pwd
|
||||||
|
test (realpath $output_pwd) = $real_getcwd
|
||||||
|
and echo "BogusPWD test 2 succeeded"
|
||||||
|
or echo "BogusPWD test 2 failed: $output_pwd vs $real_getcwd"
|
||||||
|
|
||||||
|
|
||||||
# cd back before removing the test directory again.
|
# cd back before removing the test directory again.
|
||||||
cd $oldpwd
|
cd $oldpwd
|
||||||
rm -Rf $base
|
rm -Rf $base
|
||||||
|
|||||||
@@ -21,3 +21,5 @@ cd:
|
|||||||
####################
|
####################
|
||||||
# Virtual PWD inheritance
|
# Virtual PWD inheritance
|
||||||
PWD is /tmp/cdcomp_test/linkhome
|
PWD is /tmp/cdcomp_test/linkhome
|
||||||
|
BogusPWD test 1 succeeded
|
||||||
|
BogusPWD test 2 succeeded
|
||||||
|
|||||||
Reference in New Issue
Block a user