mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-05-30 17:32:02 +01:00
Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
### These examples are here to show the user
|
||||
### How the parser works by showing examples that will not parse
|
||||
### The beginning nushell script writer / user may get confused
|
||||
### as to why their script is not working
|
||||
###
|
||||
### If you uncomment any of the defs below these are
|
||||
### the error messages you will see
|
||||
#
|
||||
#
|
||||
#
|
||||
### Examples p1 - p3 below elucidate the following idea:
|
||||
### That a brace has to be on the same line as the def
|
||||
###
|
||||
###
|
||||
### Error: nu::parser::missing_positional
|
||||
### The error message is: "Missing required positional argument"
|
||||
### missing block
|
||||
###
|
||||
### help: Usage: def <def_name> <params> <block>
|
||||
###
|
||||
#
|
||||
### https://github.com/nushell/nushell/issues/2972
|
||||
#
|
||||
### All of these examples will not parse.
|
||||
|
||||
### def p1 [arg]
|
||||
### { echo $arg }
|
||||
|
||||
### def p2 [arg]
|
||||
### {
|
||||
### echo $arg }
|
||||
|
||||
### def p3 [arg]
|
||||
### {
|
||||
### echo $arg
|
||||
### }
|
||||
|
||||
### This breaks because you need a space between
|
||||
### between foo and the left bracket
|
||||
### def foo[] {
|
||||
### "bar"
|
||||
### }
|
||||
### This works
|
||||
### def foo [] {
|
||||
### "bar"
|
||||
### }
|
||||
Reference in New Issue
Block a user