diff --git a/.gitignore b/.gitignore index 66d62f8..b8696cf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,45 @@ +# Build artifacts +build/ +*.o +*.exe +shell +shell.exe + +# System files +.DS_Store +Thumbs.db + +# IDE/Editor files +.vscode/ +.idea/ +*.swp +*.swo +*~ +.vim/ + +# Temporary files +*.tmp +*.temp +*.log + +# Claude Code local settings **/.claude/settings.local.json + +# Core dumps and debugging +core +*.core +vgcore.* + +# Static analysis +*.gcov +*.gcda +*.gcno + +# Archives +*.tar.gz +*.zip +*.tar.bz2 + +# Personal files +notes.txt +todo.txt diff --git a/Makefile b/Makefile index 48ad965..7344348 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,30 @@ CC = gcc -CFLAGS = -Wextra -g +CFLAGS = -Wextra -g -Iinclude LIBS = -lm -lncurses -# Get all .c files -SOURCES = $(wildcard *.c) -# Generate object file names from source file names -OBJECTS = $(SOURCES:.c=.o) +# Directories +SRC_DIR = src +INC_DIR = include +BUILD_DIR = build + +# Get all .c files from src directory +SOURCES = $(wildcard $(SRC_DIR)/*.c) +# Generate object file names in build directory +OBJECTS = $(SOURCES:$(SRC_DIR)/%.c=$(BUILD_DIR)/%.o) TARGET = shell -all: $(TARGET) +all: $(BUILD_DIR) $(TARGET) + +$(BUILD_DIR): + mkdir -p $(BUILD_DIR) $(TARGET): $(OBJECTS) $(CC) $(CFLAGS) -o $@ $^ $(LIBS) -%.o: %.c +$(BUILD_DIR)/%.o: $(SRC_DIR)/%.c $(CC) $(CFLAGS) -c $< -o $@ clean: - rm -f $(OBJECTS) $(TARGET) + rm -rf $(BUILD_DIR) $(TARGET) .PHONY: all clean diff --git a/bookmarks.o b/bookmarks.o deleted file mode 100644 index df18d94..0000000 Binary files a/bookmarks.o and /dev/null differ diff --git a/aliases.o b/build/aliases.o similarity index 52% rename from aliases.o rename to build/aliases.o index 7b16e99..711f278 100644 Binary files a/aliases.o and b/build/aliases.o differ diff --git a/autocorrect.o b/build/autocorrect.o similarity index 67% rename from autocorrect.o rename to build/autocorrect.o index 1811b19..5ee3484 100644 Binary files a/autocorrect.o and b/build/autocorrect.o differ diff --git a/build/bookmarks.o b/build/bookmarks.o new file mode 100644 index 0000000..4111330 Binary files /dev/null and b/build/bookmarks.o differ diff --git a/builtins.o b/build/builtins.o similarity index 73% rename from builtins.o rename to build/builtins.o index ab12eaf..a8e16a2 100644 Binary files a/builtins.o and b/build/builtins.o differ diff --git a/build/countdown_timer.o b/build/countdown_timer.o new file mode 100644 index 0000000..479bf6e Binary files /dev/null and b/build/countdown_timer.o differ diff --git a/build/diff_viewer.o b/build/diff_viewer.o new file mode 100644 index 0000000..0966e63 Binary files /dev/null and b/build/diff_viewer.o differ diff --git a/favorite_cities.o b/build/favorite_cities.o similarity index 53% rename from favorite_cities.o rename to build/favorite_cities.o index 07ee910..4fa007c 100644 Binary files a/favorite_cities.o and b/build/favorite_cities.o differ diff --git a/filters.o b/build/filters.o similarity index 56% rename from filters.o rename to build/filters.o index ee33c05..3d9aa16 100644 Binary files a/filters.o and b/build/filters.o differ diff --git a/fzf_native.o b/build/fzf_native.o similarity index 55% rename from fzf_native.o rename to build/fzf_native.o index 29c86a4..4424154 100644 Binary files a/fzf_native.o and b/build/fzf_native.o differ diff --git a/build/git_integration.o b/build/git_integration.o new file mode 100644 index 0000000..80a8a8e Binary files /dev/null and b/build/git_integration.o differ diff --git a/grep.o b/build/grep.o similarity index 54% rename from grep.o rename to build/grep.o index 9f0b318..476d2ed 100644 Binary files a/grep.o and b/build/grep.o differ diff --git a/line_reader.o b/build/line_reader.o similarity index 67% rename from line_reader.o rename to build/line_reader.o index 7c3f7f1..c76f8a5 100644 Binary files a/line_reader.o and b/build/line_reader.o differ diff --git a/build/main.o b/build/main.o new file mode 100644 index 0000000..217749e Binary files /dev/null and b/build/main.o differ diff --git a/ncurses_diff_viewer.o b/build/ncurses_diff_viewer.o similarity index 72% rename from ncurses_diff_viewer.o rename to build/ncurses_diff_viewer.o index 3c453bf..e7728d9 100644 Binary files a/ncurses_diff_viewer.o and b/build/ncurses_diff_viewer.o differ diff --git a/persistent_history.o b/build/persistent_history.o similarity index 53% rename from persistent_history.o rename to build/persistent_history.o index a1e16fb..c57add7 100644 Binary files a/persistent_history.o and b/build/persistent_history.o differ diff --git a/build/ps_command.o b/build/ps_command.o new file mode 100644 index 0000000..71a7a54 Binary files /dev/null and b/build/ps_command.o differ diff --git a/ripgrep.o b/build/ripgrep.o similarity index 65% rename from ripgrep.o rename to build/ripgrep.o index 89b8d06..aa620e5 100644 Binary files a/ripgrep.o and b/build/ripgrep.o differ diff --git a/shell.o b/build/shell.o similarity index 58% rename from shell.o rename to build/shell.o index 6eb9aa1..7afb611 100644 Binary files a/shell.o and b/build/shell.o differ diff --git a/build/structured_data.o b/build/structured_data.o new file mode 100644 index 0000000..f3259fe Binary files /dev/null and b/build/structured_data.o differ diff --git a/build/system_monitor.o b/build/system_monitor.o new file mode 100644 index 0000000..dd10651 Binary files /dev/null and b/build/system_monitor.o differ diff --git a/tab_complete.o b/build/tab_complete.o similarity index 73% rename from tab_complete.o rename to build/tab_complete.o index 1ff8410..72ee4de 100644 Binary files a/tab_complete.o and b/build/tab_complete.o differ diff --git a/themes.o b/build/themes.o similarity index 54% rename from themes.o rename to build/themes.o index 5b445c6..ffa412b 100644 Binary files a/themes.o and b/build/themes.o differ diff --git a/build/timer.o b/build/timer.o new file mode 100644 index 0000000..6e8c954 Binary files /dev/null and b/build/timer.o differ diff --git a/build/weather.o b/build/weather.o new file mode 100644 index 0000000..06b26ce Binary files /dev/null and b/build/weather.o differ diff --git a/countdown_timer.o b/countdown_timer.o deleted file mode 100644 index 95bbc65..0000000 Binary files a/countdown_timer.o and /dev/null differ diff --git a/diff_viewer.o b/diff_viewer.o deleted file mode 100644 index 2f021eb..0000000 Binary files a/diff_viewer.o and /dev/null differ diff --git a/contents.md b/docs/contents.md similarity index 100% rename from contents.md rename to docs/contents.md diff --git a/rg_selection.txt b/docs/rg_selection.txt similarity index 100% rename from rg_selection.txt rename to docs/rg_selection.txt diff --git a/shell.bat b/docs/shell.bat similarity index 100% rename from shell.bat rename to docs/shell.bat diff --git a/git_integration.o b/git_integration.o deleted file mode 100644 index d7a9430..0000000 Binary files a/git_integration.o and /dev/null differ diff --git a/aliases.h b/include/aliases.h similarity index 100% rename from aliases.h rename to include/aliases.h diff --git a/autocorrect.h b/include/autocorrect.h similarity index 100% rename from autocorrect.h rename to include/autocorrect.h diff --git a/bookmarks.h b/include/bookmarks.h similarity index 100% rename from bookmarks.h rename to include/bookmarks.h diff --git a/builtins.h b/include/builtins.h similarity index 100% rename from builtins.h rename to include/builtins.h diff --git a/common.h b/include/common.h similarity index 100% rename from common.h rename to include/common.h diff --git a/countdown_timer.h b/include/countdown_timer.h similarity index 100% rename from countdown_timer.h rename to include/countdown_timer.h diff --git a/diff_viewer.h b/include/diff_viewer.h similarity index 100% rename from diff_viewer.h rename to include/diff_viewer.h diff --git a/favorite_cities.h b/include/favorite_cities.h similarity index 100% rename from favorite_cities.h rename to include/favorite_cities.h diff --git a/filters.h b/include/filters.h similarity index 100% rename from filters.h rename to include/filters.h diff --git a/fzf_native.h b/include/fzf_native.h similarity index 100% rename from fzf_native.h rename to include/fzf_native.h diff --git a/git_integration.h b/include/git_integration.h similarity index 100% rename from git_integration.h rename to include/git_integration.h diff --git a/grep.h b/include/grep.h similarity index 100% rename from grep.h rename to include/grep.h diff --git a/line_reader.h b/include/line_reader.h similarity index 100% rename from line_reader.h rename to include/line_reader.h diff --git a/ncurses_diff_viewer.h b/include/ncurses_diff_viewer.h similarity index 100% rename from ncurses_diff_viewer.h rename to include/ncurses_diff_viewer.h diff --git a/persistent_history.h b/include/persistent_history.h similarity index 100% rename from persistent_history.h rename to include/persistent_history.h diff --git a/ripgrep.h b/include/ripgrep.h similarity index 100% rename from ripgrep.h rename to include/ripgrep.h diff --git a/shell.h b/include/shell.h similarity index 100% rename from shell.h rename to include/shell.h diff --git a/structured_data.h b/include/structured_data.h similarity index 100% rename from structured_data.h rename to include/structured_data.h diff --git a/system_monitor.h b/include/system_monitor.h similarity index 100% rename from system_monitor.h rename to include/system_monitor.h diff --git a/tab_complete.h b/include/tab_complete.h similarity index 100% rename from tab_complete.h rename to include/tab_complete.h diff --git a/themes.h b/include/themes.h similarity index 100% rename from themes.h rename to include/themes.h diff --git a/timer.h b/include/timer.h similarity index 100% rename from timer.h rename to include/timer.h diff --git a/weather.h b/include/weather.h similarity index 100% rename from weather.h rename to include/weather.h diff --git a/main.o b/main.o deleted file mode 100644 index c04b7fb..0000000 Binary files a/main.o and /dev/null differ diff --git a/mingw-get-setup.exe b/mingw-get-setup.exe deleted file mode 100644 index 0b28bc1..0000000 Binary files a/mingw-get-setup.exe and /dev/null differ diff --git a/ncurses_diff_viewer_complete.o b/ncurses_diff_viewer_complete.o deleted file mode 100644 index e5f0001..0000000 Binary files a/ncurses_diff_viewer_complete.o and /dev/null differ diff --git a/ncurses_diff_viewer_fixed.o b/ncurses_diff_viewer_fixed.o deleted file mode 100644 index 1913676..0000000 Binary files a/ncurses_diff_viewer_fixed.o and /dev/null differ diff --git a/ps_command.o b/ps_command.o deleted file mode 100644 index 87287b5..0000000 Binary files a/ps_command.o and /dev/null differ diff --git a/shell b/shell index 978cf33..4b082ac 100755 Binary files a/shell and b/shell differ diff --git a/shell.exe b/shell.exe deleted file mode 100644 index dd9f0a6..0000000 Binary files a/shell.exe and /dev/null differ diff --git a/aliases.c b/src/aliases.c similarity index 100% rename from aliases.c rename to src/aliases.c diff --git a/autocorrect.c b/src/autocorrect.c similarity index 100% rename from autocorrect.c rename to src/autocorrect.c diff --git a/bookmarks.c b/src/bookmarks.c similarity index 100% rename from bookmarks.c rename to src/bookmarks.c diff --git a/builtins.c b/src/builtins.c similarity index 100% rename from builtins.c rename to src/builtins.c diff --git a/countdown_timer.c b/src/countdown_timer.c similarity index 100% rename from countdown_timer.c rename to src/countdown_timer.c diff --git a/diff_viewer.c b/src/diff_viewer.c similarity index 100% rename from diff_viewer.c rename to src/diff_viewer.c diff --git a/favorite_cities.c b/src/favorite_cities.c similarity index 100% rename from favorite_cities.c rename to src/favorite_cities.c diff --git a/filters.c b/src/filters.c similarity index 100% rename from filters.c rename to src/filters.c diff --git a/fzf_native.c b/src/fzf_native.c similarity index 100% rename from fzf_native.c rename to src/fzf_native.c diff --git a/git_integration.c b/src/git_integration.c similarity index 100% rename from git_integration.c rename to src/git_integration.c diff --git a/grep.c b/src/grep.c similarity index 100% rename from grep.c rename to src/grep.c diff --git a/line_reader.c b/src/line_reader.c similarity index 100% rename from line_reader.c rename to src/line_reader.c diff --git a/main.c b/src/main.c similarity index 100% rename from main.c rename to src/main.c diff --git a/ncurses_diff_viewer.c b/src/ncurses_diff_viewer.c similarity index 100% rename from ncurses_diff_viewer.c rename to src/ncurses_diff_viewer.c diff --git a/persistent_history.c b/src/persistent_history.c similarity index 100% rename from persistent_history.c rename to src/persistent_history.c diff --git a/ps_command.c b/src/ps_command.c similarity index 100% rename from ps_command.c rename to src/ps_command.c diff --git a/ripgrep.c b/src/ripgrep.c similarity index 100% rename from ripgrep.c rename to src/ripgrep.c diff --git a/shell.c b/src/shell.c similarity index 100% rename from shell.c rename to src/shell.c diff --git a/structured_data.c b/src/structured_data.c similarity index 100% rename from structured_data.c rename to src/structured_data.c diff --git a/system_monitor.c b/src/system_monitor.c similarity index 100% rename from system_monitor.c rename to src/system_monitor.c diff --git a/tab_complete.c b/src/tab_complete.c similarity index 100% rename from tab_complete.c rename to src/tab_complete.c diff --git a/themes.c b/src/themes.c similarity index 100% rename from themes.c rename to src/themes.c diff --git a/timer.c b/src/timer.c similarity index 100% rename from timer.c rename to src/timer.c diff --git a/weather.c b/src/weather.c similarity index 100% rename from weather.c rename to src/weather.c diff --git a/structured_data.o b/structured_data.o deleted file mode 100644 index f7dea30..0000000 Binary files a/structured_data.o and /dev/null differ diff --git a/system_monitor.o b/system_monitor.o deleted file mode 100644 index 9118cb0..0000000 Binary files a/system_monitor.o and /dev/null differ diff --git a/another_test.txt b/tests/another_test.txt similarity index 100% rename from another_test.txt rename to tests/another_test.txt diff --git a/test.txt b/tests/test.txt similarity index 100% rename from test.txt rename to tests/test.txt diff --git a/test_file_for_diff.txt b/tests/test_file_for_diff.txt similarity index 100% rename from test_file_for_diff.txt rename to tests/test_file_for_diff.txt diff --git a/timer.o b/timer.o deleted file mode 100644 index 743d329..0000000 Binary files a/timer.o and /dev/null differ diff --git a/weather.o b/weather.o deleted file mode 100644 index 4d9490b..0000000 Binary files a/weather.o and /dev/null differ