mirror of
https://github.com/nushell/nushell.git
synced 2024-11-28 19:33:47 +01:00
simplify hooks and set display_output
to table
`table` is the default behaviour for `display_output` without any config.
This commit is contained in:
parent
e25e5ccd66
commit
ae7e8111c0
@ -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.
|
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: {
|
hooks: {
|
||||||
pre_prompt: [{||
|
pre_prompt: [{ null }] # run before the prompt is shown
|
||||||
null # replace with source code to run before the prompt is shown
|
pre_execution: [{ null }] # run before the repl input is run
|
||||||
}]
|
|
||||||
pre_execution: [{||
|
|
||||||
null # replace with source code to run before the repl input is run
|
|
||||||
}]
|
|
||||||
env_change: {
|
env_change: {
|
||||||
PWD: [{|before, after|
|
PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
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: [
|
menus: [
|
||||||
|
Loading…
Reference in New Issue
Block a user