Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions custom-completions/adb/adb-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def "nu-complete adb wait-for-transport" [] {

def "nu-complete adb reboot-type" [] {
[
bootloader
recovery
edl
bootloader
recovery
edl
sideload # Reboots into recovery and automatically starts sideload mode.
sideload-auto-reboot
" "
Expand All @@ -38,7 +38,7 @@ export extern "adb" [
-H: string # name of adb server host [default=localhost]
-P: int # port of adb server [default=5037]
-L: string # listen on given socket for adb server [default=tcp:localhost:5037]

--exit-on-write-error # exit if stdout is closed
]

Expand All @@ -55,7 +55,7 @@ export extern "adb connect" [

# Disconnect from given TCP/IP device [default PORT=5555], or all.
export extern "adb disconnect" [
host_port?: string # Disconnect device via TCP/IP [default PORT=5555] (disconnec all if no ip given).
host_port?: string # Disconnect device via TCP/IP [default PORT=5555] (disconnect all if no ip given).
]

# Pair with a device for secure TCP/IP communication.
Expand Down Expand Up @@ -157,7 +157,7 @@ export extern "adb install-multi-package" [
# Remove specified application from the device
export extern "adb uninstall" [
APPLICATION_ID: string # Remove this APPLICATION_ID from the device.
-k
-k
]

# Run remote shell command (interactive shell if no command given)
Expand Down Expand Up @@ -202,7 +202,7 @@ export extern "adb sync" [
]

# Ensure that there is a server running.
export extern "adb start-server" [ # only allowed with 'start-server' or 'server nodaemon',
export extern "adb start-server" [ # only allowed with 'start-server' or 'server nodaemon',
--one-device: string@"nu-complete adb one-device-args" #server will only connect to one USB device, specified by a serial number or USB device address.
]

Expand Down Expand Up @@ -281,7 +281,7 @@ export extern "adb remount" [

# Reboot the device; defaults to booting system image but supports bootloader and recovery too.
export extern "adb reboot" [
type:string@"nu-complete adb reboot-type"
type:string@"nu-complete adb reboot-type"
]

# Sideload the given full OTA package
Expand All @@ -301,4 +301,4 @@ export extern "adb usb" []
# Restart adbd listening on TCP on PORT.
export extern "adb tcpip" [
PORT:string
]
]
2 changes: 1 addition & 1 deletion custom-completions/bmc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This CLI can:
- create a new client action
- and rename an existing client action

This `bmc` module particulary adds the completions for the [nushell](nushell.sh/) shell
This `bmc` module particularly adds the completions for the [nushell](nushell.sh/) shell

## How to install

Expand Down
2 changes: 1 addition & 1 deletion custom-completions/bmc/bmc-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export extern "bmc run" [
--version # Show version number
]

# Import a new bussiness from a token
# Import a new business from a token
export extern "bmc import" [
apiToken: string # command
--help # Show help
Expand Down
12 changes: 6 additions & 6 deletions custom-completions/just/just-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def get-recipes [] {

def "nu-complete just" [] {
get-recipes
| select recipe doc parameters
| each {|recipe|
| select recipe doc parameters
| each {|recipe|
let name = $recipe.recipe
mut desc = $recipe.doc | default " "
for $p in $recipe.parameters {
Expand All @@ -33,7 +33,7 @@ def "nu-complete args" [context:string,offset:int] {
get-just-arg $name $position
}

# Provides argument of recipe $name at position $positions.
# Provides argument of recipe $name at position $positions.
def get-just-arg [name:string,position:int] {
let recipes = (
get-recipes
Expand All @@ -46,7 +46,7 @@ def get-just-arg [name:string,position:int] {
} else {
$recipes
| get $position
| each {|recipe|
| each {|recipe|
let name = $recipe.name
if not ($recipe.default | is-empty) {
[[value description];
Expand All @@ -63,7 +63,7 @@ def get-just-arg [name:string,position:int] {
}
}

# Veriables and Assignments are apparently the same thing...
# Variables and Assignments are apparently the same thing...
def "nu-complete just assignments" [] {
^just --dump --dump-format json
| from json
Expand Down Expand Up @@ -121,7 +121,7 @@ export extern "just" [
--shell-arg # Invoke shell with <SHELL-ARG> as an argument
--show(-s):string@"nu-complete just" # Show information about <RECIPE>
--working-directory(-d) # Use <WORKING-DIRECTORY> as working directory. --justfile must also be set
]
]

def "nu-complete just format" [] {
[ "just", "json" ]
Expand Down
46 changes: 23 additions & 23 deletions custom-completions/kw/kw-completions.nu
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def "nu-complete kw man pages" [] {

def "nu-complete kw warnings" [] {
[
[value description];
["1" "not too often, may be relevant"]
["2" "quite often, may still be relevant"]
[value description];
["1" "not too often, may be relevant"]
["2" "quite often, may still be relevant"]
["3" "more obscure, likely ignorable"]
["12" "warns 1 and 2"]
["13" "warns 1 and 3"]
Expand All @@ -59,9 +59,9 @@ def "nu-complete kw init template" [] {

def "nu-complete kw init arch" [] {
if ("arch" | path exists) {
ls arch
| where type == "dir"
| get name
ls arch
| where type == "dir"
| get name
| each {|el| $el | str replace 'arch/' ''}
} else {
[]
Expand All @@ -77,8 +77,8 @@ def "nu-complete kw cores" [] {
}

def "nu-complete kw configs" [] {
^kw config -s
| lines
^kw config -s
| lines
| parse --regex '\[.*\] (?<value>[a-z_.]+)=(?<description>.+)$'
}

Expand All @@ -105,7 +105,7 @@ export extern "kw version" [
...args: string
]

# Initalize kworkflow config file
# Initialize kworkflow config file
export extern "kw init" [
--template: string@"nu-complete kw init template" # Uses a template as the kworkflow.config
--arch: string@"nu-complete kw init arch" # Sets the variable arch from the newly created kworkflow.config
Expand All @@ -117,12 +117,12 @@ export extern "kw init" [

# Builds the kernel
export extern "kw build" [
...flags: string
...flags: string
--info(-i) # Displays build information
--menu(-n) # Invokes the kernel menuconfig
--doc(-d) # Builds the documentation
--cpu-scaling(-S): int@"nu-complete kw cores" # Sets the number of jobs to use for building the kernel (the -j flag)
--ccache # Enable ccache
--cpu-scaling(-S): int@"nu-complete kw cores" # Sets the number of jobs to use for building the kernel (the -j flag)
--ccache # Enable ccache
--warnings(-w): string@"nu-complete kw warnings" # Sets the warning level for the kernel build
--save-log-to(-s): string # Saves the build log to a file
--llvm # Uses LLVM toolchain during compilation and linking
Expand Down Expand Up @@ -186,14 +186,14 @@ export alias "kw s" = kw ssh
export extern "kw codestyle" [
path?: string # Which files to run checkpatch on. Defaults to the cwd
--help(-h) # Shows help page
--verbose # Verbose mode
--verbose # Verbose mode
]

export alias "kw c" = kw codestyle

export extern "kw self-update" [
--unstable(-u) # Update kw based on the unstable branch
--help(-h) # Shows help page
--help(-h) # Shows help page
--verbose # Verbose mode
]

Expand All @@ -212,9 +212,9 @@ export alias "kw m" = kw maintainers
export extern "kw kernel-config-manager" [
--save: string # Creates a snapshot of the .config file with the given name
-d: string # Sets the description when using --save
--force(-f) # Supress warnings
--force(-f) # Suppress warnings
--get: string # Gets the config with the given name and overwrites the current .config file
--remove(-r): string # Removes the config with the given name
--remove(-r): string # Removes the config with the given name
--list(-l) # Lists all the configs being managed
--fetch # Fetches a .config from a target machine
--output(-o): string # Sets the output file when using --fetch
Expand Down Expand Up @@ -256,7 +256,7 @@ export extern "kw explore" [
expr?: string # Expression to search for
--log(-l) # Search using git log with the given string
--grep(-g) # Search using grep with the given string
--all(-a) # Search using git grep with the given string
--all(-a) # Search using git grep with the given string
--only-source(-c) # Show only results from source code
--only-header(-H) # Show only results from header
-p: string # Path to where to start the search
Expand All @@ -272,7 +272,7 @@ export extern "kw pomodoro" [
--tag(-g): string # Tag the pomodoro
--description(-d): string # Describe the pomodoro task
--check-timer(-c) # Check the current timer
--show-tags(-s) # Show all tags used in pomodoros
--show-tags(-s) # Show all tags used in pomodoros
--help(-h) # Shows help page
--verbose # Verbose mode
]
Expand All @@ -284,7 +284,7 @@ export extern "kw report" [
--year: string="" # Shows the report for the current year if not specified <year>
--month: string="" # Shows the report for the current month if not specified <year>/<month>
--week: string="" # Shows the report for the current week if not specified <year>/<week>
--day: string="" # Shows the report for the current day if not specified <year>/<month>/<day>
--day: string="" # Shows the report for the current day if not specified <year>/<month>/<day>
--all # Shows all the data in the report
--statistics(-s) # Shows the statistics of the report
--pomodoro # Shows the pomodoro data in the report
Expand All @@ -304,7 +304,7 @@ export extern "kw device" [
]

# kernel debug
export extern "kw debug" [
export extern "kw debug" [
--dmesg(-g) # Collect dmesg log.
--event(-e): string="" # Enable specific events to be traced. If no event is specified, all events will be enabled.
--ftrace(-t) # Enable ftrace.
Expand Down Expand Up @@ -368,7 +368,7 @@ export extern "kw clear-cache" []

# drm subsystem support
export extern "kw drm" [
--local # Show all DRM drivers available in the local machine.
--local # Show all DRM drivers available in the local machine.
--remote: string # Specify the target device for the drm action, can be a remote or local machine.
--load-module: string # Allow user to specify one or more modules to load with or without parameters.
--unload-module: string # Allow users to unload one or more DRM drivers.
Expand All @@ -388,8 +388,8 @@ export extern "kw vm" [
--alert: string@"nu-complete kw deploy alert" # set alert behaviour upon command completion
]


# Show kw man page
export extern "kw help" []

export alias "kw h" = kw help
export alias "kw h" = kw help
4 changes: 2 additions & 2 deletions custom-completions/tealdeer/tldr-completions.nu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# authour: DWTW

def platformOveride [] {
def platformOverride [] {
[ "linux", "macos", "windows", "sunos", "osx", "android" ]
}

Expand All @@ -13,7 +13,7 @@ export extern "tldr" [
string?
--list(-l) # Lists all commands in the cache
--render(-f): string # Render a specific markdown file
--platform(-f): string@platformOveride # Override the operating system
--platform(-f): string@platformOverride # Override the operating system
--language(-L): string # Override the language
--update(-u) # Update the local cache
--no-auto-update # If auto update is configured. disable it for this run
Expand Down
10 changes: 6 additions & 4 deletions make_release/release-note/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ author_site: https://twitter.com/nu_shell
author_image: https://www.nushell.sh/blog/images/nu_logo.png
excerpt: Today, we're releasing version {{VERSION}} of Nu. This release adds...
---

<!-- TODO: complete the excerpt above -->

<!-- NOTE: start from the TODO all the way at the bottom (and sort of work your way up) -->

# Nushell {{VERSION}}

<!-- TODO: write this excerpt -->

Today, we're releasing version {{VERSION}} of Nu. This release adds...

# Where to get it
Expand Down Expand Up @@ -58,9 +60,9 @@ As part of this release, we also publish a set of optional plugins you can insta

Thanks to all the contributors below for helping us solve issues, improve documentation, refactor code, and more! :pray:

| author | title | link |
| ------------------------------------ | ----------- | ------------------------------------------------------- |
| [@author](https://github.com/author) | ... | [#12345](https://github.com/nushell/nushell/pull/12345) |
| author | title | link |
| ------------------------------------ | ----- | ------------------------------------------------------- |
| [@author](https://github.com/author) | ... | [#12345](https://github.com/nushell/nushell/pull/12345) |

# Full changelog

Expand All @@ -69,7 +71,7 @@ Thanks to all the contributors below for helping us solve issues, improve docume
- run `list-prs --milestone v{{VERSION}} | pr-table`
- paste the output here

Afterwards, go through each PR and clasify it as one of the following:
Afterwards, go through each PR and classify it as one of the following:
- A user-facing change. These PRs should go into the `# Changes` section.
- A plugin-facing change. These PRs should go in `# Notes for plugin developers`. Some plugin-facing changes might also be a user-facing change and vice versa.
- A documentation improvement, error message improvement, refactoring PR, clippy fix, typo fix, etc. These PRs go into the `# Hall of fame`. You can just copy the table row in this section and paste it to the `# Hall of fame` section above. Note that major refactorings may warrant a section in `# Highlights`.
Expand Down
17 changes: 9 additions & 8 deletions modules/coloring/256_color_testpattern.nu
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def print_colour [ colour:int ] {
$bg_color + $fg_color + $text + " "
}

let printable_colours = 256
const printable_colours = 256

def print_run [start:int, amount:int] {
$start..<($start + $amount) | each { |i|
Expand All @@ -62,12 +62,13 @@ def print_blocks [start:int, end:int, block_cols:int, block_rows:int, blocks_per
} | str join
}

print (print_run 0 16) # The first 16 colours are spread over the whole spectrum
print "" # Single line
print (print_blocks 16 123 6 6 3) # 6x6x6 colour cube between 16 and 123 inclusive
print (print_blocks 124 231 6 6 3) # 6x6x6 colour cube between 124 and 231 inclusive
print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey

export def main [] {
print (print_run 0 16) # The first 16 colours are spread over the whole spectrum
print "" # Single line
print (print_blocks 16 123 6 6 3) # 6x6x6 colour cube between 16 and 123 inclusive
print (print_blocks 124 231 6 6 3) # 6x6x6 colour cube between 124 and 231 inclusive
print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey
}

# bash:

Expand Down Expand Up @@ -113,7 +114,7 @@ print (print_blocks 232 255 12 2 1) # Not 50, but 24 Shades of Grey
#
# # Uncomment the below for more precise luminance calculations
#
# # # Calculate percieved brightness
# # # Calculate perceived brightness
# # # See https://www.w3.org/TR/AERT#color-contrast
# # # and http://www.itu.int/rec/R-REC-BT.601
# # # Luminance is in range 0..5000 as each value is 0..5
Expand Down
6 changes: 4 additions & 2 deletions modules/coloring/nu_index_fg.nu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# this script uses foreground ansi index colors to print
# a table of 16 rows by 16 colums where each item is a
# a table of 16 rows by 16 columns where each item is a
# different color
def show_index_colors [] {
let prefix = "38;5;"
Expand All @@ -24,4 +24,6 @@ def one_liner [] {
}


show_index_colors
export def main [] {
show_index_colors
}
Loading