mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 10:31:14 -03:00
Make "." a builtin as well
Yeah, it's not going anywhere. This is one line in builtin.cpp vs 9 lines of script, most of which used to print an error that is never triggered.
This commit is contained in:
@@ -154,16 +154,6 @@ end
|
||||
# in UTF-8 (with non-ASCII characters).
|
||||
__fish_set_locale
|
||||
|
||||
# "." alias for source; deprecated
|
||||
function . -d 'Evaluate a file (deprecated, use "source")' --no-scope-shadowing --wraps source
|
||||
if [ (count $argv) -eq 0 ] && isatty 0
|
||||
echo "source: using source via '.' is deprecated, and stdin doesn't work."\n"Did you mean 'source' or './'?" >&2
|
||||
return 1
|
||||
else
|
||||
source $argv
|
||||
end
|
||||
end
|
||||
|
||||
# Upgrade pre-existing abbreviations from the old "key=value" to the new "key value" syntax.
|
||||
# This needs to be in share/config.fish because __fish_config_interactive is called after sourcing
|
||||
# config.fish, which might contain abbr calls.
|
||||
|
||||
@@ -342,6 +342,7 @@ int builtin_false(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
|
||||
// Functions that are bound to builtin_generic are handled directly by the parser.
|
||||
// NOTE: These must be kept in sorted order!
|
||||
static const builtin_data_t builtin_datas[] = {
|
||||
{L".", &builtin_source, N_(L"Evaluate contents of file")},
|
||||
{L":", &builtin_true, N_(L"Return a successful result")},
|
||||
{L"[", &builtin_test, N_(L"Test a condition")},
|
||||
{L"and", &builtin_generic, N_(L"Execute command if previous command succeeded")},
|
||||
|
||||
@@ -62,7 +62,6 @@ complete
|
||||
# CHECK: complete {{.*}}
|
||||
# CHECK: complete {{.*}}
|
||||
# CHECK: complete {{.*}}
|
||||
# CHECK: complete {{.*}}
|
||||
|
||||
# Recursive calls to complete (see #3474)
|
||||
complete -c complete_test_recurse1 -xa '(echo recursing 1>&2; complete -C"complete_test_recurse1 ")'
|
||||
|
||||
Reference in New Issue
Block a user