Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/MordechaiHadad/bob
/ functions
Functions
104 in github.com/MordechaiHadad/bob
⨍
Functions
104
◇
Types & classes
24
↓ 16 callers
Function
get_downloads_directory
Asynchronously returns the 'downloads' directory path based on the application configuration. This function takes a reference to a `Config` as an arg
src/helpers/directories.rs:151
↓ 12 callers
Method
file_name
(&self, name: &str)
src/cli.rs:210
↓ 9 callers
Function
parse_version_type
Parses the version type from a version string. This function takes a version string and determines the type of the version. It supports the following
src/helpers/version/mod.rs:49
↓ 7 callers
Function
is_version_used
Checks if a specific version is currently being used. This function retrieves the current version from the configuration and checks if it matches the
src/helpers/version/mod.rs:259
↓ 6 callers
Function
handle_subprocess
Handles the execution of a subprocess. This function takes a mutable reference to a `Command` struct, which represents the subprocess to be executed.
src/helpers/processes.rs:43
↓ 5 callers
Function
deserialize_response
Deserializes a JSON response from the GitHub API. This function takes a JSON response as a string and attempts to deserialize it into a specified typ
src/github_requests.rs:320
↓ 5 callers
Method
get
Does what it says on the tin, get's the config file # Returns `ConfigFile` - A struct containing the path to the config file, the format of the confi
src/config.rs:47
↓ 5 callers
Function
get_installation_directory
Asynchronously returns the installation directory path based on the application configuration. This function takes a reference to a `Config` as an ar
src/helpers/directories.rs:195
↓ 4 callers
Function
get_rc_files_from_shell
( shell: &what_the_path::shell::Shell, )
src/handlers/use_handler.rs:519
↓ 4 callers
Function
hash_binary
Computes the SHA-256 checksum of the file at `path`. # Arguments `path` - A reference to a `&Path` representing the file whose checksum will be compu
src/helpers/checksum.rs:45
↓ 4 callers
Function
is_version_installed
Checks if a specific version of Neovim is installed. This function reads the downloads directory and checks if there is a directory with the name mat
src/helpers/version/mod.rs:192
↓ 4 callers
Function
make_github_request
Asynchronously makes a GitHub API request. This function takes a reference to a `Client` and a URL as arguments. It sets the "user-agent" header to "
src/github_requests.rs:169
↓ 4 callers
Method
set_position
(&self, position: u64)
src/handlers/install_handler.rs:456
↓ 3 callers
Function
copy_env_files_if_not_exist
( config: &Config, installation_dir: &str, )
src/handlers/use_handler.rs:603
↓ 3 callers
Function
download_version
Asynchronously downloads a specified version of Neovim. This function sends a request to download the specified version of Neovim based on the versio
src/handlers/install_handler.rs:346
↓ 3 callers
Function
get_platform_name
Returns the platform-specific name for the Neovim version. This function takes an `Option<Version>` as an argument, which represents the version of N
src/helpers/mod.rs:31
↓ 3 callers
Function
handle_building_from_source
(version: &ParsedVersion, config: &Config)
src/handlers/install_handler.rs:514
↓ 3 callers
Function
produce_nightly_vec
Produces a vector of `LocalNightly` structs from the downloads directory. This function reads the downloads directory and creates a `LocalNightly` st
src/helpers/version/nightly.rs:75
↓ 2 callers
Function
get_current_version
Retrieves the current version of Neovim being used. This function reads the "used" file from the downloads directory, which contains the current vers
src/helpers/version/mod.rs:231
↓ 2 callers
Function
get_home_dir
Returns the home directory path for the current user. This function checks the target operating system using the `cfg!` macro and constructs the home
src/helpers/directories.rs:25
↓ 2 callers
Function
get_upstream_stable
Asynchronously searches for the stable version of Neovim. This function takes a reference to a `Client` as an argument and makes a GitHub API request
src/github_requests.rs:243
↓ 2 callers
Function
get_version_sync_file_location
Retrieves the location of the version sync file. This function checks the `version_sync_file_location` field of the provided configuration. If the fi
src/helpers/version/mod.rs:148
↓ 2 callers
Function
modify_path
(installation_dir: &str)
src/handlers/use_handler.rs:412
↓ 2 callers
Function
print_commits
Asynchronously prints the commits between two versions of Neovim. This function fetches the commits between the published dates of the local and upst
src/handlers/install_handler.rs:291
↓ 2 callers
Function
remove_base_parent
(path: &Path)
src/helpers/unarchive.rs:313
↓ 2 callers
Function
remove_dir
Asynchronously removes a directory and all its contents. This function takes a string reference as an argument, which represents the directory to be
src/helpers/filesystem.rs:31
↓ 2 callers
Method
save_to_file
(&self)
src/config.rs:19
↓ 2 callers
Function
switch
Switches to a specified version. This function changes the current directory to the downloads directory, writes the version to a file named "used", a
src/handlers/use_handler.rs:124
↓ 1 callers
Function
add_to_path
Adds the installation directory to the system's PATH. This function checks if the installation directory is already in the PATH. If not, it adds the
src/handlers/use_handler.rs:345
↓ 1 callers
Function
compare_binaries
Checks whether the SHA-256 checksum of `origin` matches the checksum of `proxy`. # Arguments `origin` - A reference to a `&Path` for the original bin
src/helpers/checksum.rs:66
↓ 1 callers
Function
copy_dir_async
( from: impl AsRef<Path> + 'static, to: impl AsRef<Path> + 'static, )
src/helpers/filesystem.rs:92
↓ 1 callers
Function
copy_file_with_error_handling
(old_path: &Path, new_path: &Path)
src/handlers/use_handler.rs:279
↓ 1 callers
Function
copy_nvim_proxy
(config: &ConfigFile)
src/handlers/use_handler.rs:200
↓ 1 callers
Function
create_if_not_exist
(file_path: P, env_path: &str)
src/handlers/use_handler.rs:531
↓ 1 callers
Function
create_reqwest_client
Creates a new `reqwest::Client` with default headers. This function fetches the `GITHUB_TOKEN` environment variable and uses it to set the `Authoriza
src/cli.rs:44
↓ 1 callers
Method
default
()
src/config.rs:161
↓ 1 callers
Function
expand
(downloaded_file: &LocalVersion)
src/helpers/unarchive.rs:101
↓ 1 callers
Function
file_type_ext
(version: &ParsedVersion, get_sha256sum: bool)
src/handlers/install_handler.rs:461
↓ 1 callers
Method
finish
(&self, root: P, file_type: S)
src/handlers/install_handler.rs:442
↓ 1 callers
Function
get_commits_for_nightly
Fetches the commits for the nightly version from the GitHub API. This function sends a GET request to the GitHub API to fetch the commits for the nig
src/github_requests.rs:283
↓ 1 callers
Function
get_config_file
Returns the local data directory path for the current user. This function first gets the home directory path by calling the `get_home_dir` function.
src/helpers/directories.rs:104
↓ 1 callers
Function
get_latest_commit
Fetches the latest commit from the Neovim repository on GitHub. This function sends a GET request to the GitHub API to fetch the latest commit from t
src/helpers/version/mod.rs:292
↓ 1 callers
Function
get_local_data_dir
Returns the local data directory path for the current user. This function first gets the home directory path by calling the `get_home_dir` function.
src/helpers/directories.rs:76
↓ 1 callers
Function
get_local_nightly
Retrieves the local nightly version. This function reads the `bob.json` file in the `nightly` directory of the downloads directory and parses it into
src/helpers/version/nightly.rs:34
↓ 1 callers
Function
get_upstream_nightly
Fetches the upstream nightly version from the GitHub API. # Parameters `Client` - A reference to a `reqwest::Client` used to make the request. # Re
src/github_requests.rs:208
↓ 1 callers
Function
handle_envars
Handles environment variables in the configuration. This function takes a mutable reference to a `Config` object. It uses a `Regex` to match environm
src/config.rs:245
↓ 1 callers
Function
handle_nvim_process
Handles the execution of the Neovim process. This function takes a reference to a `Config` struct and a slice of `String` arguments. It retrieves the
src/helpers/processes.rs:89
↓ 1 callers
Function
handle_rollback
Asynchronously handles the rollback for the nightly version(s) of Neovim. This function checks if the nightly version is used and if the rollback lim
src/handlers/install_handler.rs:225
↓ 1 callers
Function
has_rollbacks
Checks if there are any rollbacks available. This function produces a vector of nightly versions and checks if it is empty. # Arguments `config` -
src/handlers/list_handler.rs:128
↓ 1 callers
Function
humanize_duration
Converts a `Duration` into a human-readable string. This function takes a `Duration` and converts it into a string that represents the duration in we
src/handlers/rollback_handler.rs:120
↓ 1 callers
Function
init_tracing
Installs the global tracing subscriber with a reload-capable filter layer. The subscriber starts at **INFO** level. Call [`setup_tracing`] later to h
src/cli.rs:253
↓ 1 callers
Function
is_neovim_running
()
src/helpers/processes.rs:151
↓ 1 callers
Function
is_version
Checks if a given string is a valid version. This function checks if the given string is "stable", contains "nightly", or matches the version or hash
src/handlers/list_handler.rs:153
↓ 1 callers
Method
needs_running_check
Utility method to determine if the current command needs a running neovim check. Only used at the start of the program.
src/cli.rs:157
↓ 1 callers
Method
process
`process` method for `Option<String>`. This is a method for structs that implement the `EnvVarProcessor` trait. It's deigned to process the `Option<S
src/config.rs:197
↓ 1 callers
Function
run
()
src/main.rs:29
↓ 1 callers
Function
send_request
Sends a GET request to the specified URL to download a specific version of Neovim. # Arguments `client: &Client` - A reference to the `Client` used
src/handlers/install_handler.rs:701
↓ 1 callers
Function
setup_tracing
Reconfigures the global tracing filter based on CLI verbosity and `RUST_LOG`. Precedence: 1. If `verbose > 0`: 1 → DEBUG, 2+ → TRACE. 2. Else if `RUS
src/cli.rs:280
↓ 1 callers
Function
sha256cmp
Checks whether the checksum of the file at path 'a' matches the checksum saved in the file at path 'b'. # Arguments `a` - A reference to a `&Path` ob
src/helpers/checksum.rs:17
↓ 1 callers
Function
start
Starts the CLI application. This function takes a `Config` object as input and returns a `Result`. It creates a Reqwest client, parses the CLI argume
src/cli.rs:324
↓ 1 callers
Method
try_generate
( &self, cmd: &clap::Command, buf: &mut dyn std::io::Write, )
src/cli.rs:226
↓ 1 callers
Function
uninstall_selections
Uninstalls selected versions. This function reads the versions from the downloads directory, presents a list of installed versions to the user, allow
src/handlers/uninstall_handler.rs:100
Function
compare_binaries_different
()
src/helpers/checksum.rs:102
Function
copy_env_files_test
()
src/handlers/use_handler.rs:650
Method
deref
(&self)
src/handlers/use_handler.rs:568
Function
fish_get_rc_files_test
()
src/handlers/use_handler.rs:666
Method
from
(paths: (F, S))
src/handlers/use_handler.rs:591
Method
generate
(&self, cmd: &clap::Command, buf: &mut dyn std::io::Write)
src/cli.rs:221
Function
get_platform_name_higher
()
src/helpers/mod.rs:86
Function
get_platform_name_lower
()
src/helpers/mod.rs:74
Function
get_platform_name_none
()
src/helpers/mod.rs:59
Function
hash_binary_and_compare_binaries_same
()
src/helpers/checksum.rs:83
Function
is_hash
(version: &str)
src/helpers/version/mod.rs:310
Function
main
()
src/main.rs:19
Method
new
(total_size: u64, tag_name: &'a S, get_sha256sum: bool)
src/handlers/install_handler.rs:429
Function
sh_get_rc_files_test
()
src/handlers/use_handler.rs:697
Function
sh_get_rc_with_env_test
()
src/handlers/use_handler.rs:717
Function
sha256cmp_with_checksum_file
()
src/helpers/checksum.rs:114
Function
start
Starts the process of expanding a downloaded file. This function is asynchronous and uses `tokio::task::spawn_blocking` to run the `expand` function
src/helpers/unarchive.rs:45
Function
start
Starts the process of using a specified version. This function checks if the specified version is already used, copies the Neovim proxy to the instal
src/handlers/use_handler.rs:48
Function
start
Starts the update process based on the provided `Update` data, `Client`, and `Config`. # Arguments `data: Update` - Contains the version information
src/handlers/update_handler.rs:52
Function
start
Starts the synchronization process. This function reads the version from a sync file and starts the use handler with the read version. # Arguments
src/handlers/sync_handler.rs:38
Function
start
(config: Config)
src/handlers/erase_handler.rs:46
Function
start
Starts the rollback process. This function presents a list of available versions to the user, allows them to select a version to rollback to, and the
src/handlers/rollback_handler.rs:32
Function
start
( version: &ParsedVersion, client: &Client, config: &ConfigFile, )
src/handlers/install_handler.rs:66
Function
start
Starts the uninstall process. This function creates a new HTTP client, determines the version to uninstall, checks if the version is currently in use
src/handlers/uninstall_handler.rs:43
Function
start
Starts the list handler. This function reads the downloads directory and lists all the installed versions in a formatted table. It also checks if a v
src/handlers/list_handler.rs:30
Function
start
Starts the process of running a specific version of Neovim with the provided arguments. This function parses the specified version, checks if it's in
src/handlers/run_handler.rs:23
Function
start
Asynchronously starts the process of listing remote versions of Neovim. This function takes a `Config` and a `Client` as arguments. It first gets the
src/handlers/list_remote_handler.rs:46
Function
test_as_stable
()
src/handlers/list_handler.rs:203
Function
test_is_hash
()
src/helpers/version/mod.rs:315
Function
test_is_hash_with_empty_string
()
src/helpers/version/mod.rs:351
Function
test_is_hash_with_invalid_hash
()
src/helpers/version/mod.rs:345
Function
test_is_hash_with_long_hash
()
src/helpers/version/mod.rs:369
Function
test_is_hash_with_non_hexadecimal_characters
()
src/helpers/version/mod.rs:357
Function
test_is_hash_with_short_hash
()
src/helpers/version/mod.rs:363
Function
test_is_hash_with_valid_hash
()
src/helpers/version/mod.rs:339
Function
test_is_version
()
src/handlers/list_handler.rs:171
Function
test_with_empty_string
()
src/handlers/list_handler.rs:245
Function
test_with_invalid_version
()
src/handlers/list_handler.rs:223
next →
1–100 of 104, ranked by callers