You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The default behavior of the Nickel command is to deeply evaluate a program and pretty-print the result. Experience has shown that it's not very intuitive: all other actions correspond to a subcommand, and what's more, evaluation is not necessarily the most used one (it's probably nickel export). So, it doesn't make a lot of sense to have it be the default behavior.
A second detail is to have to use nickel export -f foo.ncl. It's cool that Nickel uses stdin by default, to allow piping with other commands, but most of the time we want to export a specific file: it's the main expected argument of most subcommand. In that case, we could use positional arguments instead and just write nickel export foo.ncl. As a natural extension, we could provide multiple Nickel files, the semantics being to merge them all: nickel export network.ncl firewall.ncl cpu.ncl would be equivalent to nickel export <<< '(import "network.ncl") & (import "firewall.ncl") & (import "cpu.ncl")'.
Describe the solution you'd like
Get rid of the default behavior of nickel: that is, you have to specify a subcommand, and add a subcommand nickel eval which would correspond to the current plain nickel invocation.
Get rid of the argument -f/--file and use positional arguments instead to pass files to evaluate.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The default behavior of the Nickel command is to deeply evaluate a program and pretty-print the result. Experience has shown that it's not very intuitive: all other actions correspond to a subcommand, and what's more, evaluation is not necessarily the most used one (it's probably
nickel export
). So, it doesn't make a lot of sense to have it be the default behavior.A second detail is to have to use
nickel export -f foo.ncl
. It's cool that Nickel uses stdin by default, to allow piping with other commands, but most of the time we want to export a specific file: it's the main expected argument of most subcommand. In that case, we could use positional arguments instead and just writenickel export foo.ncl
. As a natural extension, we could provide multiple Nickel files, the semantics being to merge them all:nickel export network.ncl firewall.ncl cpu.ncl
would be equivalent tonickel export <<< '(import "network.ncl") & (import "firewall.ncl") & (import "cpu.ncl")'
.Describe the solution you'd like
Get rid of the default behavior of
nickel
: that is, you have to specify a subcommand, and add a subcommandnickel eval
which would correspond to the current plainnickel
invocation.Get rid of the argument
-f/--file
and use positional arguments instead to pass files to evaluate.The text was updated successfully, but these errors were encountered: