Module utils

Module utils 

Source
Expand description

Path and terminal utilities. Utility module for nrs.

Common utilities for paths, terminal handling, and other helpers.

Structs§

TerminalSize
Terminal size information.

Constants§

MAX_SEARCH_DEPTH
Maximum number of parent directories to search.
MIN_HEIGHT
MIN_WIDTH
Minimum terminal dimensions.

Functions§

check_terminal_size
Check the terminal size.
cleanup_terminal
Cleanup terminal completely.
config_dir
Get the config directory for nrs.
disable_raw_mode
Disable raw mode.
enable_raw_mode
Enable raw mode for TUI.
enter_alternate_screen
Enter the alternate screen buffer.
find_package_json
Find the package.json file starting from the given directory.
find_project_root
Find the project root (directory containing package.json).
global_config_file
Get the global config file path.
hide_cursor
Hide the cursor.
history_file
Get the history file path.
is_raw_mode_enabled
Check if the terminal is currently in raw mode.
leave_alternate_screen
Leave the alternate screen buffer.
local_config_file
Find local config file in project directory.
prepare_for_script_execution
Prepare terminal for script execution.
restore_for_tui
Restore terminal for TUI.
show_cursor
Show the cursor.