Last active
November 4, 2025 13:56
-
-
Save mkatychev/4bd8873f078f7984bf37f9d6609e8c6a to your computer and use it in GitHub Desktop.
Find + Search and Replace Nushell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def is-help []: list<any> -> bool { | |
| ('-h' in $in) or ('--help' in $in) | |
| } | |
| export def fd --wrapped [...$args]: nothing -> oneof<list<string>, nothing> { | |
| if ($args | is-help) { | |
| return (^fd ...$args) | |
| } | |
| ^fd ...$args | lines | |
| } | |
| export def sd --wrapped [...args]: oneof<list<string>, nothing> -> nothing { | |
| ^sd ...$args ...$in | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment