mirror of
https://github.com/thegeneralist01/config.git
synced 2026-05-30 08:37:01 +02:00
bump nushell
This commit is contained in:
parent
07c949f7ff
commit
cb442ce45e
3 changed files with 29 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue