1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-05-30 08:37:01 +02:00

bump nushell

This commit is contained in:
TheGeneralist 2026-03-11 20:37:50 +01:00
parent 07c949f7ff
commit cb442ce45e
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
3 changed files with 29 additions and 1 deletions

View file

@ -346,6 +346,29 @@ def --env mcg [path: path]: nothing -> nothing {
jj git init --colocate
}
# ls files sorted by latest DESC
def latest [
path: path = .
--all (-a) # show all files
number: int = 0 # optional number for head
]: nothing -> table {
let result = (
if $all {
ls --all $path
} else {
ls $path
}
| sort-by modified
| reverse
)
if ($number != 0) {
$result | first $number
} else {
$result
}
}
# Open a file in nvim using fzf.
def vff []: nothing -> nothing {
nvim (fzf)