Comments (3)
Yeah, I could get behind making the signatures more consistent and spreadable using form 2.
. This could also help simplify the code and avoid bugs as #11212 highlights.
One thing to keep in mind for any PRs is that ls
lists the current directory when given no args. So, there would have to be a condition to check that if the rest args are empty, then double check that call.arguments
actually has no positional arguments.
from nushell.
As a nice alternative, perhaps change all of them to be <filenames> ...(rest)
but detect if <filenames>
is a list and automatically handle it if so.
from nushell.
Regarding <filename> ...(rest)
vs ...(rest)
and spreading I think it should be possible to define rest command arguments in more general way that would encode varied number of arguments in one argument so that it would also be possible to generate correct and understandable syntax/usage documentation. Something like array destructuring (in nu psedo-code):
def cp [[src, ...rest, dest]: string] { ... }
from nushell.
Related Issues (20)
- `extern` improperly converts `=` arguments
- Allow Completers to accept lists and expressions that return a list HOT 4
- osc2: Any string same as the home dir path in pwd will be replaced with ~ in titlebar
- column width heuristic
- Inconsistent/Surprising string interpolation for unquoted strings depending on context
- NuShell install size HOT 12
- Contribute Shell Integration Sequence for VS Code. HOT 8
- `glob` doesn't accept globs HOT 1
- External stdout / stderr stream redirect parses incorrectly HOT 1
- Make error point to command name HOT 2
- Ctrl+A doesn't select all text HOT 1
- `touch` doesn't handle glob properly
- Completion system offers file/path completer on types for which it doesn't make sense HOT 1
- Completion match highlight gets thrown off by quoting
- A full `cell-path` doesn't work for most commands that accept one via `...rest`
- Autoload directories for package managers is not load when using `--commands` HOT 6
- Modifying keybindings from within a module won't work. HOT 2
- Add command to reload Nu's configuration HOT 1
- Can't `select` row+column cell-path HOT 1
- `update` takes cell-path with column.row, but not row.column HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nushell.