1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-02 07:07:46 +00:00

Merge pull request #120 from fdncred/fix_into_column_path

updated `into column_path` to `into column-path`
This commit is contained in:
Darren Schroeder 2022-01-06 07:22:18 -06:00 committed by GitHub
commit 48dd7bb953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,18 +23,18 @@ def get_my_location [index: int] {
if ($city_column | str length) > 1 {
if ($state_column | str length) > 1 {
if ($country_column | str length) > 1 {
let lookup_state = ($loc_json | get ($state_column | into column_path))
let lookup_state = ($loc_json | get ($state_column | into column-path))
if ($lookup_state | str length) > 2 {
let state = (state_abbrev_lookup $lookup_state)
$"($loc_json | get ($city_column | into column_path)),($state),($loc_json | get ($country_column | into column_path))"
$"($loc_json | get ($city_column | into column-path)),($state),($loc_json | get ($country_column | into column-path))"
} {
$"($loc_json | get ($city_column | into column_path)),($loc_json | get ($state_column | into column_path)),($loc_json | get ($country_column | into column_path))"
$"($loc_json | get ($city_column | into column-path)),($loc_json | get ($state_column | into column-path)),($loc_json | get ($country_column | into column-path))"
}
} {
$"($loc_json | get ($city_column | into column_path)),($loc_json | get ($state_column | into column_path))"
$"($loc_json | get ($city_column | into column-path)),($loc_json | get ($state_column | into column-path))"
}
} {
$"($loc_json | get ($city_column | into column_path))"
$"($loc_json | get ($city_column | into column-path))"
}
} {
"No City Found"