From f8ea98a468bc4549b035ca9c4377bf0046cea4ec Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Sat, 20 Jun 2026 09:25:04 +0530 Subject: [PATCH] refactor: rename b conf to bcon --- b.sh | 6 +++--- bootstrap.sh | 2 +- commands/{conf.sh => con.sh} | 4 ++-- commands/help.sh | 2 +- readme.md | 4 ++-- routes.sh | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) rename commands/{conf.sh => con.sh} (93%) diff --git a/b.sh b/b.sh index 7905f90..4129ffe 100755 --- a/b.sh +++ b/b.sh @@ -48,7 +48,7 @@ _b_completion() { # If completing the first argument after 'b' if [ "$COMP_CWORD" -eq 1 ]; then - opts="all conf bye" + opts="all con bye" local routes_file="$HOME/.config/bootstrap/routes.sh" if [ -f "$routes_file" ]; then @@ -82,8 +82,8 @@ _b_completion() { return 0 fi - # If completing arguments for 'b conf ' - if [ "$COMP_CWORD" -eq 2 ] && [ "$prev" = "conf" ]; then + # If completing arguments for 'b con ' + if [ "$COMP_CWORD" -eq 2 ] && [ "$prev" = "con" ]; then # List of directories in ~/.config/ to choose from local config_dirs config_dirs=$(find "$HOME/.config" -mindepth 1 -maxdepth 1 -type d -exec basename {} \; 2>/dev/null) diff --git a/bootstrap.sh b/bootstrap.sh index 3bc3f83..b12a111 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -72,7 +72,7 @@ install_bootstrap() { "lib/platform.sh" "lib/shell_config.sh" "commands/help.sh" - "commands/conf.sh" + "commands/con.sh" "commands/uninstall.sh" ) diff --git a/commands/conf.sh b/commands/con.sh similarity index 93% rename from commands/conf.sh rename to commands/con.sh index 0732618..e1bfe7c 100644 --- a/commands/conf.sh +++ b/commands/con.sh @@ -1,9 +1,9 @@ -# Command: conf +# Command: con # Edits configurations in ~/.config/ config_name="${1:-}" if [ -z "$config_name" ]; then - log_error "Usage: b conf [files...]" + log_error "Usage: b con [files...]" exit 1 fi shift diff --git a/commands/help.sh b/commands/help.sh index 04cdc6f..a72bea4 100644 --- a/commands/help.sh +++ b/commands/help.sh @@ -4,7 +4,7 @@ echo "Available bootstrap commands:" # Non-installers first (aligned to 6 chars width) printf " %-6s - %s\n" "all" "List all available commands" -printf " %-6s - %s\n" "conf" "Edit config (e.g. b conf nvim)" +printf " %-6s - %s\n" "con" "Edit config (e.g. b con nvim)" printf " %-6s - %s\n" "bye" "Uninstall Bootstrap CLI helper" # Installers second diff --git a/readme.md b/readme.md index feb61ca..e427540 100644 --- a/readme.md +++ b/readme.md @@ -36,8 +36,8 @@ b nvim,yazi You can also edit configurations located in your `~/.config/` directory by running: ```bash -b conf nvim -b conf i3 +b con nvim +b con i3 ``` It automatically fuzzy-finds the folder in case there is no exact match. diff --git a/routes.sh b/routes.sh index bf16ee0..4b4db2d 100755 --- a/routes.sh +++ b/routes.sh @@ -71,9 +71,9 @@ for script in "${SCRIPTS[@]}"; do exit 1 fi ;; - conf) - if [ -f "$BOOTSTRAP_DIR/commands/conf.sh" ]; then - . "$BOOTSTRAP_DIR/commands/conf.sh" "$@" + con) + if [ -f "$BOOTSTRAP_DIR/commands/con.sh" ]; then + . "$BOOTSTRAP_DIR/commands/con.sh" "$@" else log_error "Config editor command script not found." exit 1