mirror of
https://github.com/danbulant/dotfiles
synced 2026-05-20 04:48:58 +00:00
working onefetch in nu
This commit is contained in:
parent
5e134559ff
commit
397ff8381f
1 changed files with 8 additions and 1 deletions
|
|
@ -288,7 +288,14 @@ export-env {
|
|||
pre_prompt: [{ null }] # run before the prompt is shown
|
||||
pre_execution: [{ null }] # run before the repl input is run
|
||||
env_change: {
|
||||
PWD: [{ |before, after| if (ls -la | where name == ".git" | is-not-empty) { onefetch } }] # run if the PWD environment is different since the last repl input
|
||||
PWD: [{
|
||||
|before, after|
|
||||
# runs on startup
|
||||
if (($before | is-not-empty) and (ls -la | where name == ".git" | is-not-empty)) {
|
||||
# output to stdout in hooks is unreliable, use `print`
|
||||
print (onefetch)
|
||||
}
|
||||
}]
|
||||
}
|
||||
display_output: { table } # run before the output of a command is drawn, example: `{ if (term size).columns >= 100 { table -e } else { table } }`
|
||||
command_not_found: { null } # return an error message when a command is not found
|
||||
|
|
|
|||
Loading…
Reference in a new issue