他のシェルと DSL から Nu への対応表
このテーブルは Nu の組込みコマンドやプラグインと他のシェルや DLS(Domain Specific Languages)との対応関係を理解することを助けるためのものです。ここでは全ての Nu コマンドとそのコマンドが他の言語でどう使われているかをマッピングしています。コントリビューション歓迎です。
注: Nu が 0.14.1 以降であることを想定しています。
Nushell | SQL | .Net LINQ (C#) | PowerShell (without external modules) | Bash |
---|---|---|---|---|
alias | - | - | alias | alias |
append | - | Append | -Append | |
args | - | - | ||
autoview | - | - | ||
average(* ) | avg | Average | Measure-Object, measure | |
binaryview(* ) | - | Format-Hex | ||
calc, = math | math operators | Aggregate, Average, Count, Max, Min, Sum | bc | |
cd | - | - | Set-Location, cd | cd |
clear | - | - | Clear-Host | clear |
clip | - | - | Set-Clipboard, scb | clip, clipboard, xclip, pbcopy |
compact | ||||
config | - | - | $Profile | vi .bashrc, .profile |
count | count | Count | Measure-Object, measure | wc |
cp | - | - | Copy-Item, cp, copy | cp |
date | NOW() / getdate() | DateTime class | Get-Date | date |
debug | ||||
= dec | x-- | |||
default | ||||
drop | ||||
du | - | - | du | |
each | cursor | ForEach-Object, foreach, for | ||
echo | - | Write-Output, write | echo | |
enter | - | - | ||
evaluate_by | ||||
exit | - | exit | exit | |
first | top, limit | First, FirstOrDefault | Select-Object -First | head |
format | String.Format | String.Format | ||
from | import flatfile, openjson, cast(variable as xml) | - | Import/ConvertFrom-{Csv,Xml,Html,Json} | |
get | Select | (cmd).column | ||
group_by | group by | GroupBy, group | Group-Object, group | |
headers | ||||
help | sp_help | - | Get-Help, help, man | man |
histogram | - | - | ||
history | - | - | Get-History, history | history |
http(* ) | - | HttpClient,WebClient, HttpWebRequest/Response | Invoke-WebRequest | wget |
inc(* ) | - | - | - | |
insert | Add-Member | |||
is_empty | is null | String.InNullOrEmpty | String.InNullOrEmpty | |
keep, =take | top, limit | Take | Select-Object -First | head |
keep_until | ||||
keep_while | TakeWhile | |||
kill | - | - | Stop-Process, kill | kill |
last | Last, LastOrDefault | Select-Object -Last | tail | |
lines | - | - | File.ReadAllLines | |
ls | - | - | Get-ChildItem, dir, ls | ls |
map_max_by | ||||
match(* ) | case when | Regex.IsMatch | [regex] | |
merge | ||||
mkdir | - | - | mkdir, md | mkdir |
mv | - | - | Move-Item, mv, move, mi | mv |
next | ||||
nth | limit x offset y, rownumber = | ElementAt | [x], indexing operator, ElementAt | |
open | Get-Content, gc, cat, type | cat | ||
parse | ||||
pivot, =transpose | pivot | - | ||
post(* ) | - | HttpClient,WebClient, HttpWebRequest/Response | Invoke-WebRequest | |
prepend | ||||
prev | ||||
ps(* ) | - | - | Get-Process, ps, gps | ps |
pwd | - | - | Get-Location, pwd | pwd |
range | Range | 1..10, 'a'..'f' | ||
reduce_by | Aggregate | |||
reject | ||||
rename | - | - | Rename-Item, ren, rni | mv |
reverse | Reverse | [Array]::Reverse($var) | ||
rm | - | - | Remove-Item, del, erase, rd, ri, rm, rmdir | rm |
save | - | - | Write-Output, Out-File | > foo.txt |
select(*** ) | select | Select | Select-Object, select | |
shells | - | - | - | |
shuffle | Random | $var | Sort-Object {Get-Random} | |
size | Measure-Object, measure | wc | ||
skip | where row_number() | Skip | Select-Object -Skip | |
skip_until | ||||
skip_while | SkipWhile | |||
sort-by | order by | OrderBy, OrderByDescending, ThenBy, ThenByDescending | Sort-Object, sort | |
split_by | Split | Split | ||
split_column | - | |||
split_row | - | |||
str(* ) | string functions | String class | String class | |
sum | sum | Sum | Measure-Object, measure | |
sys(* ) | - | - | Get-ComputerInfo | uname, lshw, lsblk, lscpu, lsusb, hdparam, free |
table | Format-Table, ft, Format-List, fl | |||
tags | - | - | - | |
textview(* ) | - | - | Get-Content, cat | |
tree(* ) | - | - | tree | |
to | - | - | Export/ConvertTo-{Csv,Xml,Html,Json} | |
touch | - | - | Set-Content | touch |
trim | rtrim, ltrim | Trim, TrimStart, TrimEnd | Trim | |
uniq | distinct | Distinct | Get-Unique, gu | uniq |
update(** ) | As | - | ||
version | select @@version | - | $PSVersionTable | |
with_env | - | - | $env:FOO = 'bar' | export foo = "bar" |
what | ||||
where | where | Where | Where-Object, where, "?" operator | |
which | - | - | - | which |
wrap |
*
- these commands are part of the standard plugins**
- renamed fromedit
toupdate
in 0.13.1***
- renamed frompick
toselect
in 0.13.1