simplify hooks and set display_output to table

`table` is the default behaviour for `display_output` without
any config.
This commit is contained in:
amtoine 2023-07-13 18:26:12 +02:00
parent e25e5ccd66
commit ae7e8111c0
No known key found for this signature in database
GPG Key ID: 37AAE9B486CFF1AB

View File

@ -302,23 +302,13 @@ $env.config = {
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
hooks: {
pre_prompt: [{||
null # replace with source code to run before the prompt is shown
}]
pre_execution: [{||
null # replace with source code to run before the repl input is run
}]
pre_prompt: [{ null }] # run before the prompt is shown
pre_execution: [{ null }] # run before the repl input is run
env_change: {
PWD: [{|before, after|
null # replace with source code to run if the PWD environment is different since the last repl input
}]
}
display_output: {||
if (term size).columns >= 100 { table -e } else { table }
}
command_not_found: {||
null # replace with source code to return an error message when a command is not found
PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
}
display_output: { table } # run before the output of a command is drawn
command_not_found: { null } # return an error message when a command is not found
}
menus: [