stuf
This commit is contained in:
parent
78c1198d90
commit
fada7e988b
4 changed files with 24 additions and 6 deletions
|
|
@ -56,8 +56,8 @@ def --env c [path: path = "~"] {
|
|||
l
|
||||
}
|
||||
|
||||
def l --wrapped [...rest] {
|
||||
ls -t ...$rest | insert ext {|row| $row.name | parse "{name}.{ext}" | get ext | get 0? } | sort-by type ext name | reject type ext
|
||||
def l --wrapped [path: path = ".", ...rest] {
|
||||
ls -t $path ...$rest | insert ext {|row| $row.name | parse "{name}.{ext}" | get ext | get 0? } | sort-by type ext name | reject type ext
|
||||
}
|
||||
|
||||
alias list-automounts = systemctl list-units --type=automount
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ def ns [...packages: string] {
|
|||
# nix search nixpkgs $package
|
||||
# }
|
||||
|
||||
def --wrapped rebuild [subcommand, ...rest] {
|
||||
def --wrapped rebuild [--force, subcommand, ...rest] {
|
||||
if not (
|
||||
df -h | detect columns --guess | where "Mounted on" == "/" or "Mounted on" == "/boot" | get Use% | each {parse "{usage}%" | get usage | into int} | flatten | all {$in < 99}
|
||||
) {
|
||||
) and not $force {
|
||||
print "not enough disk space!"
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue