non important commit

This commit is contained in:
maxstrb 2025-10-01 21:34:00 +02:00
parent 3b264457e9
commit 8357ab281a

View file

@ -42,25 +42,21 @@
} }
def edit [user_file?: path] { def edit [user_file?: path] {
let file = if ($user_file | is-empty) or ($user_file == null) { let file = if ($user_file | is-empty) {
pwd "."
} else { } else {
$user_file $user_file
} }
let git_result = do { git rev-parse --show-toplevel } | complete let git_result = do { git rev-parse --show-toplevel } | complete
if $git_result.exit_code == 0 { if $git_result.exit_code == 0 {
let root = $git_result.stdout | str trim let root = $git_result.stdout | str trim
let flake_path = $root | path join "flake.nix" let flake_path = $root | path join "flake.nix"
if not ($flake_path | path exists) { if not ($flake_path | path exists) {
nvim $file nvim $file
return return
} }
cd $root cd $root
# Pass nvim directly as the command instead of wrapping in bash -c
nix develop . --command nvim $file nix develop . --command nvim $file
} else { } else {
nvim $file nvim $file