Assorted shell and Python scripts
1#!/usr/bin/env nu 2 3let continent = ( 4 ls /usr/share/zoneinfo 5 | where name !~ "posix" and name !~ "right" 6 | where type == dir 7 | get name 8 | path basename 9 | input list $"\n(ansi red)Select a continent:(ansi reset)" 10) 11 12let city = ( 13 ls ("/usr/share/zoneinfo" | path join $continent) 14 | get name 15 | path basename 16 | input list $"\n(ansi red)Select a city:(ansi reset)" 17) 18 19print "" 20let timezone = ([$continent, "/", $city] | str join) 21["The time in ", $timezone, " is:"] | str join | print 22date now | date to-timezone $timezone