eedcd10dbb
Just as a heads up, I haven't really tested this since a lot of it is stuff I don't use or know how to set up without some reading up. I have tested the nu_conda_2 change since I have a python project that I use that for, and I could look into testing more of it if needed. I've tried finding (naively using `/sys\W/`) all the usage of the old plain `sys` calls and replacing them with alternates as appropriate, which mostly has been to swap a `(sys).host.name` call into a `$nu.os-info.name` one, since it'll be tad faster and more consistent across platforms with naming (especially as the value comes from the [rust stdlib](https://doc.rust-lang.org/std/env/consts/constant.OS.html) and is very predictable). Fixes #897 |
||
---|---|---|
.. | ||
after | ||
argx | ||
aws | ||
background_task | ||
base16 | ||
clone-all | ||
coloring | ||
completion-generator | ||
cwdhist | ||
data_extraction | ||
docker | ||
duplicates | ||
filesystem | ||
fnm | ||
formats | ||
fun | ||
fuzzy | ||
git | ||
gitv2 | ||
history-utils | ||
jc | ||
kubernetes | ||
language | ||
lg | ||
log | ||
ls_mods | ||
maths | ||
network | ||
nix | ||
nvim | ||
parsing | ||
prompt | ||
random-list | ||
rbenv | ||
recursion | ||
system | ||
to-json-schema | ||
virtual_environments | ||
wc | ||
weather | ||
with_externals | ||
lint_directories.nu | ||
maintainer_time.nu | ||
make_readme_table.nu | ||
README.md |
Modules
after
Run a function after the given program (by PID)
api_wrappers
Demo of various API wrappers:
background_task
make nushell "support" background task feature. see README
base16
Base16 theme generator (for Linux, might work for other OS) see README
coloring
These scripts are used to demonstrate the ansi
command using ansi
coloring. This is mainly a demo area where we have taken typical bash
scripts and ported them to nushell scripts. It would be nice if all scripts here showed the "other" version of script and the ported nushell version. We can show "other" flavors of scripts by including them as comments in the nushell scripts or by naming the nushell script and the other script the same basename.
data_extraction
- Ultimate Extractor - Extract any compressed archive, UE will call the proper program under the hood 😎
docker
An extensive example of a wrapper for docker operations, with nushell completions.
filesystem
- bm - A Simple bookmarking module. It uses
XGD_DATA_HOME
to save bookmarks. - expand - expansion module that implements bashes brace expansion.
The expansion uses a list inside of braces separated by
,
to expand into a list of multiple string variations like:
expand a/{b,c}/d{e,f,g}.nu{,on}
parses into:
╭────┬─────────────╮
│ 0 │ a/b/de.nu │
│ 1 │ a/c/de.nu │
│ 2 │ a/b/df.nu │
│ 3 │ a/c/df.nu │
│ 4 │ a/b/dg.nu │
│ 5 │ a/c/dg.nu │
│ 6 │ a/b/de.nuon │
│ 7 │ a/c/de.nuon │
│ 8 │ a/b/df.nuon │
│ 9 │ a/c/df.nuon │
│ 10 │ a/b/dg.nuon │
│ 11 │ a/c/dg.nuon │
╰────┴─────────────╯
formats
Examples of input/output formatters:
- from-cpuinfo
- from-dmidecode
- to-ini
- remove-diacritics - Turns
Zażółć gęślą jaźń
intoZazolc gesla jazn
fun
- spark - send an array into spark and get a sparkline out:
> let v = [2, 250, 670, 890, 2, 430, 11, 908, 123, 57] > spark $v ▁▂▆▇▁▄▁█▁▁
- website-builder - converts markdown into their equivalent html pages
- wordle - A Terminal Wordle game. The code is based on this gist, but slightly personalized.
github
- branch-protections - Do you have hundreds or thousands of GitHub repositories in your organization? Are you tired of manually managing their branch protection rules? Don't! Let nushell do it for you! see README
- merged-branches - Do your developers often forget to delete their branches after merging PRs? Are you tired of manually going into every repository and deleting them? Don't! Let nushell do it for you! see README
gitlab
Search files on your GitLab server
jc
Converts the output of many common external commands into nushell data structures.
Example:
: jc ping -4 -c 2 google.com
╭──────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────╮
│ destination_ip │ 216.58.209.46 │
│ data_bytes │ 56 │
│ pattern │ │
│ destination │ google.com │
│ duplicates │ 0 │
│ packets_transmitted │ 2 │
│ packets_received │ 2 │
│ packet_loss_percent │ 0.00 │
│ time_ms │ 1001.00 │
│ round_trip_ms_min │ 3.87 │
│ round_trip_ms_avg │ 4.04 │
│ round_trip_ms_max │ 4.21 │
│ round_trip_ms_stddev │ 0.17 │
│ │ ╭───┬───────┬───────────┬───────┬───────────────┬──────────┬─────┬─────────┬───────────╮ │
│ responses │ │ # │ type │ timestamp │ bytes │ response_ip │ icmp_seq │ ttl │ time_ms │ duplicate │ │
│ │ ├───┼───────┼───────────┼───────┼───────────────┼──────────┼─────┼─────────┼───────────┤ │
│ │ │ 0 │ reply │ │ 64 │ 216.58.209.46 │ 1 │ 120 │ 4.21 │ false │ │
│ │ │ 1 │ reply │ │ 64 │ 216.58.209.46 │ 2 │ 120 │ 3.87 │ false │ │
│ │ ╰───┴───────┴───────────┴───────┴───────────────┴──────────┴─────┴─────────┴───────────╯ │
╰──────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────╯
: (jc ping -4 -c 2 google.com).round_trip_ms_avg
6.054
For supported commands see JC parsers documentation
Installation:
- Install the
jc
command line: https://kellyjonbrazil.github.io/jc/#installation - Import this module in your
config.nu
:import ~/.local/share/nu_scripts/modules/jc/
kubernetes
???
make_release
???
maths
- [math_functions] - module with the following commands:
root
- root with a custom denominatorcroot
- cube rootaroot
- root with a custom scaler and denominatordelta
- calculate the delta of the quadratic functionfact
- factorial of the given numberq_roots
- calculare roots of the quadratic function: ax^2+bx+xisprime
- check if integer is primeprimelist
- list primes until given numbermtable
- multiplication table of n till maxisleap
- check if year is leapgcd
- greatest common divisor between 2 integerslcm
- least commoin multiple between 2 integersdec2base
- decimal number to custom base representationscale-minmax
- scale list to[a,b]
intervalscale-minmax-table
- Scale every column of a table (separately) to[a,b]
intervalmath exp
- exp function
network
-
remoting - This module provide convenient way to manage multiple remote clients. see README
-
sockets - The
sockets
command returns a table containing information on network sockets and the processes they belong to. It is basically a join of the tables produced by thelsof
command, and the nushellps
command. -
ssh wrapper that provides the following commands:
ssh
scp
ssh-list
parse-ssh-file
str max-length
ensure-index
nvim
??? (not sure how universal this is) Mix of hooks, defs and alias wrapper around neovim.
progress_bar
??? (make a module out of these scripts?) - Collection of progress bars
rbenv
??? (not sure how universal this is) This script provides minimal working rbenv setup.
record
A module to manipulate nu's record
system
Currently holds the clip
command which was previously incorrectly in the standard library of Nushell.
use modules/system * # will bring `clip` into scope
virtual_environments
The scripts in this directory activate virtual environments for Conda environments.
weather
These scripts should be used to demonstrate how get your local weather and/or weather forecasts.
webscraping
Simple scripts to demonstrate how to scrape websites in nushell. Requires query web
plugin