the system monitor now reacts to terminal resizing and resizes the view
automatically. also added clearer grep/filter mode ui to signify that
you are in the search mode
the monitor command now uses ncurses for a better ui experience, with this change i have reworked some of the code and the list is now sorted by CPU usage. processes can now be filtered with using '/', the process list will update in real time so you can find the process you are looking fro faster
the help command only printed the list of commands, and did not accept arugments, the help command now takes in a command as an argument andprints out that commands guide. also added autocomplete for the help command and will suggest any command from the command list.
for some reason when porting to linux a long time ago the alias command didnt work properly and aliases added in one shell session would not be saved into thealiases file (by default at ~/.lsh_aliases) but this now works and loads any time
added scrolling in the commits pane so that you can view older commits without going into them. also tried adding this to the stashes pane but because of an older bug it broke and is not working right. its added to the things to fix list
after i added the * indicator to commits and stashes, the left borded dissapeared, i forgot to indent the line with one to make space for the indicators.
fixed text in the view pane to stop / wrap before the last line, meaning that the last character is not in the border anymore
when grepping for commits, searching for author initials is now possible, and will be prioritized first. this means typing ma for marcus for example will give you all commits from marcus. if no hits are found on initials it will apply that grep to the name/titles. also some highlighing has been added to commit grep
updated stash grep to include possiblility to grep for time and branches. this means you can filter for branches and times
Replace shell command string building with temp file approach for commit
messages to prevent crashes from special characters, quotes, backticks,
and newlines.
Changes:
- Use `git commit -F tempfile` instead of `git commit -m "message"`
- Write commit messages to temporary files before passing to git
- Updated commit_marked_files(), commit_staged_changes_only(), and amend_commit()
- Eliminates shell command injection vulnerabilities
- Supports unlimited message length and any special characters
Fixes crashes when commit messages contain backticks, quotes, newlines,
or other shell metacharacters that were previously breaking the shell
command construction.
Implement comprehensive interactive staging functionality that allows
users
to stage and unstage individual lines, similar to `git add -p` but with
a
visual interface.
New features:
- Split view mode showing unstaged changes (left) and staged changes
(right)
- Line-by-line staging: press Space on any diff line to stage/unstage it
- Tab switching between unstaged and staged panes
- Apply staged changes with 'a' key (runs `git apply --cached`)
- Visual indicators for staged vs unstaged content with proper syntax
highlighting
- Interactive unstaging: switch to staged pane and press Space to
unstage lines
- Automatic refresh of git status after staging/unstaging operations
- Proper git integration reading from both working directory and staging
area
Technical implementation:
- Added `load_file_with_staging_info()` to load unstaged changes
(staging vs working)
- Added `rebuild_staged_view_from_git()` to load staged changes (HEAD vs
staging)
- Added `stage_hunk_by_line()` for individual line staging
- Added `unstage_line_from_git()` for removing lines from staging area
- Added `apply_staged_changes()` to apply staged content to git
- Enhanced file content window with split view rendering
- Added proper cursor management for both unstaged and staged panes
This transforms the diff viewer into a full-featured interactive staging
tool,
allowing developers to create atomic commits with only specific lines
rather
than entire files.
Keybindings:
- Enter: Switch to split staging view
- Tab: Switch between unstaged/staged panes
- Space: Stage/unstage current line
- 'a': Apply staged changes to git
- 'c': Commit staged changes
- 'r': Reset staged changes