pub fn handle_list_command(
source: Option<&str>,
query: Option<&str>,
format: &str,
sort: &str,
names_only: bool,
limit: Option<usize>,
stats: bool,
) -> Result<()>Expand description
Handles the list command to display environment variables with various formatting options.
§Arguments
source- Optional filter by source (system, user, process, shell)query- Optional search query to filter variablesformat- Output format (table, json, simple, compact)sort- Sort order (name, value, source)names_only- Whether to display only variable nameslimit- Optional limit on number of variables to displaystats- Whether to display statistics
§Errors
Returns an error if:
- Environment variables cannot be loaded
- Invalid source type is provided
- JSON serialization fails