mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
Deprecate the -source command.
This commit is contained in:
parent
735d30c0ff
commit
ff7c500506
|
@ -14,6 +14,8 @@ or compiled, even if it is not executed:
|
|||
|
||||
- The `has-suffix` command is now deprecated. Use `str:has-suffix` instead.
|
||||
|
||||
- The `-source` command is now deprecated. Use `eval` instead.
|
||||
|
||||
The following deprecated features trigger a warning when the code is evaluated:
|
||||
|
||||
- Using `:` in slice indicies is deprecated. Use `..` instead.
|
||||
|
|
|
@ -251,6 +251,8 @@ func nextEvalCount() int {
|
|||
//
|
||||
// Read the named file, and evaluate it in the current scope.
|
||||
//
|
||||
// This function is deprecated. Use [eval](#eval) instead.
|
||||
//
|
||||
// Examples:
|
||||
//
|
||||
// ```elvish-transcript
|
||||
|
|
|
@ -152,6 +152,8 @@ func (cp *compiler) checkDeprecatedBuiltin(name string, r diag.Ranger) {
|
|||
}
|
||||
msg := ""
|
||||
switch name {
|
||||
case "-source~":
|
||||
msg = `the "source" command is deprecated; use "eval" instead`
|
||||
case "ord~":
|
||||
msg = `the "ord" command is deprecated; use "str:to-codepoints" instead`
|
||||
case "chr~":
|
||||
|
|
Loading…
Reference in New Issue
Block a user