mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 06:41:42 +08:00
Restore .
alias for source
The breakage is just too annoying.
This reverts 55bef3cd2e
.
This commit is contained in:
parent
1e3d26f744
commit
ceddd1e684
|
@ -9,7 +9,6 @@ This section is for changes merged to the `major` branch that are not also merge
|
|||
- `?` as a glob is deprecated and will be removed in the future. (#4520). This is controlled by the `qmark-noglob` feature flag.
|
||||
|
||||
## Notable non-backward compatible changes
|
||||
- `.` command no longer exists -- use `source` (#4294).
|
||||
- `read` now uses `-s` as short for `--silent` (à la `bash`); `--shell`'s abbreviation (formerly `-s`) is now `-S` instead (#4490).
|
||||
- `set x[1] x[2] a b` is no longer valid syntax (#4236).
|
||||
- `for` loop control variables are no longer local to the `for` block (#1935).
|
||||
|
|
|
@ -172,6 +172,18 @@ end
|
|||
# in UTF-8 (with non-ASCII characters).
|
||||
__fish_set_locale
|
||||
|
||||
# "." command for compatibility with old fish versions.
|
||||
function . --description 'Evaluate contents of file (deprecated, see "source")' --no-scope-shadowing
|
||||
if test (count $argv) -eq 0
|
||||
# Uses tty directly, as isatty depends on "."
|
||||
and tty 0>&0 >/dev/null
|
||||
echo "source: '.' command is deprecated, and doesn't work with STDIN anymore. Did you mean 'source' or './'?" >&2
|
||||
return 1
|
||||
else
|
||||
source $argv
|
||||
end
|
||||
end
|
||||
|
||||
# As last part of initialization, source the conf directories.
|
||||
# Implement precedence (User > Admin > Extra (e.g. vendors) > Fish) by basically doing "basename".
|
||||
set -l sourcelist
|
||||
|
|
Loading…
Reference in New Issue
Block a user