nushell/crates/nu-protocol/src
alesito85 7c285750c7
Fixes autocomplete when using sudo (#8094)
# Description

This PR addresses issue #2047 in order to enable autocomplete
functionality when using sudo for executing commands. I'e done a couple
of auxiliary checks such as ignoring whitespace and the last pipe in
order to determine the last command.

# User-Facing Changes

The only user facing change should be the autocomplete working.

# Tests + Formatting

All tests and formatting pass.

# Screenshots

<img width="454" alt="image"
src="https://user-images.githubusercontent.com/4399118/219404037-6cce4358-68a9-42bb-a09b-2986b10fa6cc.png">

# Suggestions welcome

I still don't know the in's and out's if nushell very well, any
suggestions for improvements are welcome.
2023-02-24 15:05:36 -08:00
..
ast explain command (#7957) 2023-02-09 13:59:38 -06:00
engine Fixes autocomplete when using sudo (#8094) 2023-02-24 15:05:36 -08:00
value allow date grouping in group-by (#8084) 2023-02-15 19:10:55 +00:00
cli_error.rs Clippy fix for Rust 1.63 (#6299) 2022-08-11 11:54:54 -05:00
config.rs Display empty records and lists (#7925) 2023-02-22 16:18:33 +00:00
example.rs Make plugin commands support examples. (#7984) 2023-02-08 16:14:18 -06:00
exportable.rs Removes export env command (#6468) 2022-09-25 19:52:43 +03:00
id.rs Overlays (#5375) 2022-05-08 07:39:22 +12:00
lev_distance.rs Reduce again the number of match calls (#7815) 2023-01-24 12:23:42 +01:00
lib.rs Make plugin commands support examples. (#7984) 2023-02-08 16:14:18 -06:00
module.rs Allow main command to define top-level module command (#7764) 2023-01-22 21:34:15 +02:00
pipeline_data.rs allow Range to expand to array-like when converting to json (#8047) 2023-02-24 15:31:33 -06:00
plugin_signature.rs Make plugin commands support examples. (#7984) 2023-02-08 16:14:18 -06:00
shell_error.rs remove links to ShellError and ParseError docs - #8167 (#8193) 2023-02-24 09:26:31 -08:00
signature.rs view span & view files commands (#7989) 2023-02-09 11:35:23 -06:00
span.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
syntax_shape.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
ty.rs Display empty records and lists (#7925) 2023-02-22 16:18:33 +00:00
util.rs move BufferedReader out of nu-command (#7697) 2023-01-06 15:22:17 -08:00
variable.rs Limited mutable variables (#7089) 2022-11-11 19:51:08 +13:00