aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.cpp
diff options
context:
space:
mode:
authorGravatar Konrad Borowski <glitchmr@myopera.com>2013-08-14 18:43:09 +0300
committerGravatar Konrad Borowski <glitchmr@myopera.com>2013-08-14 18:43:09 +0300
commit5818289c2da8e53b8b52b69064254576ba7d839a (patch)
tree20b55f6c9bcbcdc1f6f4dfec98bcc5436e109480 /builtin.cpp
parentd407d680eaea4afb9eef384a003b10c5f6aafcd7 (diff)
Deprecate "." command. Fixes #310.
Needs documentation (for the new name), but manages to move . to source, while preserving compatibility.
Diffstat (limited to 'builtin.cpp')
-rw-r--r--builtin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin.cpp b/builtin.cpp
index d230080a..d01322e2 100644
--- a/builtin.cpp
+++ b/builtin.cpp
@@ -3014,7 +3014,7 @@ static int builtin_source(parser_t &parser, wchar_t ** argv)
if ((fd = wopen_cloexec(argv[1], O_RDONLY)) == -1)
{
append_format(stderr_buffer, _(L"%ls: Error encountered while sourcing file '%ls':\n"), argv[0], argv[1]);
- builtin_wperror(L".");
+ builtin_wperror(L"source");
return STATUS_BUILTIN_ERROR;
}
@@ -3022,7 +3022,7 @@ static int builtin_source(parser_t &parser, wchar_t ** argv)
{
close(fd);
append_format(stderr_buffer, _(L"%ls: Error encountered while sourcing file '%ls':\n"), argv[0], argv[1]);
- builtin_wperror(L".");
+ builtin_wperror(L"source");
return STATUS_BUILTIN_ERROR;
}
@@ -3953,7 +3953,6 @@ static int builtin_history(parser_t &parser, wchar_t **argv)
*/
static const builtin_data_t builtin_datas[]=
{
- { L".", &builtin_source, N_(L"Evaluate contents of file") },
{ L"[", &builtin_test, N_(L"Test a condition") },
{ L"and", &builtin_generic, N_(L"Execute command if previous command suceeded") },
{ L"begin", &builtin_begin, N_(L"Create a block of code") },
@@ -3993,6 +3992,7 @@ static const builtin_data_t builtin_datas[]=
{ L"return", &builtin_return, N_(L"Stop the currently evaluated function") },
{ L"set", &builtin_set, N_(L"Handle environment variables") },
{ L"set_color", &builtin_set_color, N_(L"Set the terminal color") },
+ { L"source", &builtin_source, N_(L"Evaluate contents of file") },
{ L"status", &builtin_status, N_(L"Return status information about fish") },
{ L"switch", &builtin_switch, N_(L"Conditionally execute a block of commands") },
{ L"test", &builtin_test, N_(L"Test a condition") },