Nu map from imperative languages

The idea behind this table is to help you understand how Nu built-ins and plug-ins relate to imperative languages. We’ve tried to produce a map of all the Nu commands and what their equivalents are in other languages. Contributions are welcome.

Note: this table assumes Nu 0.14.1 or later.

NuShell Python Kotlin (Java) C++ Rust
alias        
append list.append, set.add add push_back, emplace_back push, push_back
args        
autoview        
average(*) statistics.mean      
binaryview(*) "{:x}".format Integer.toHexString    
calc, = math math operators math operators math operators math operators
cd        
clear        
clip        
compact        
config        
count len size, length length len
cp shutil.copy      
date datetime.date.today java.time.LocalDate.now    
debug        
default        
drop        
du shutil.disk_usage      
each for for for for
echo print println printf println!
enter        
evaluate_by        
exit exit System.exit, kotlin.system.exitProcess exit exit
fetch(*) urllib.request.urlopen      
first list[0] List[0], peek vector[0], top Vec[0]
format format format format format!
from csv, json, sqlite3      
get dict["key"] Map["key"] map["key"] HashMap[“key”], get, entry
grep filter filter filter filter
group_by itertools.groupby groupBy   group_by
headers        
help help      
histogram        
history        
inc(*) x += 1 x++ x++ x += 1
insert list.insert      
is_empty is None isEmpty empty is_empty
keep list[:x]     &Vec[..x]
keep_until        
keep_while itertools.takewhile      
kill os.kill      
last list[-1]     &Vec[Vec.len()-1]
lines split, splitlines split views::split split, split_whitespace, rsplit, lines
ls os.listdir      
map_max_by        
match(*) re.findall Regex.matches regex_match  
merge        
mkdir os.mkdir      
mv shutil.move      
next        
nth list[x] List[x] vector[x] Vec[x]
open open      
parse        
pivot, =transpose zip(*matrix)      
post(*) urllib.request.urlopen      
prepend deque.appendleft      
prev        
ps(*) os.listdir(‘/proc’)      
pwd os.getcwd      
range range .., until, downTo, step iota ..
reduce_by functools.reduce reduce reduce fold, rfold, scan
reject        
rename shutil.move      
reverse reversed, list.reverse reverse, reversed, asReversed reverse rev
rm os.remove      
save io.TextIOWrapper.write      
select(***) {k:dict[k] for k in keylist}      
shells        
shuffle random.shuffle      
size len      
skip list[x:]     &Vec[x..]
skip_until        
skip_while itertools.dropwhile      
sort-by sorted, list.sort sortedBy, sortedWith, Arrays.sort, Collections.sort sort sort
split_by str.split{,lines}, re.split split views::split split
split_column        
split_row        
str(*) str functions String functions string functions &str, String functions
sum sum sum reduce sum
sys(*) sys      
table        
tags        
textview(*)        
tree(*)        
to csv, json, sqlite3      
touch open(path, ‘a’).close()      
trim strip, rstrip, lstrip trim, trimStart, trimEnd regex trim, trim_{start,end}, strip_{suffix,prefix}
uniq set Set set HashSet
update(**)        
version sys.version, sys.version_info      
with_env os.environ      
what        
where filter filter filter filter
which shutil.which      
wrap