Description
Extend the existing function to support autocompletion for both relative and absolute file paths. The implementation should work seamlessly across Windows and Unix systems.
Acceptance Criteria
- Autocompletion should suggest file paths (both relative and absolute) based on the current cursor position.
- Cross-platform support: Functionality must work on both Windows and Unix environments.
- Context-sensitive:
- If the cursor is not empty and contains a space, only file paths should be suggested (not commands).
- If the cursor does not contain a space, existing behavior should remain unchanged.
Additional Notes
- Please ensure proper handling of path separators for different operating systems.
- Consider edge cases such as home directories (
~), drive letters (Windows), and hidden files.
### Description
Extend the existing function to support autocompletion for both relative and absolute file paths. The implementation should work seamlessly across Windows and Unix systems.
### Acceptance Criteria
- **Autocompletion** should suggest file paths (both relative and absolute) based on the current cursor position.
- **Cross-platform support:** Functionality must work on both Windows and Unix environments.
- **Context-sensitive:**
- If the cursor is not empty and contains a space, only file paths should be suggested (not commands).
- If the cursor does not contain a space, existing behavior should remain unchanged.
### Additional Notes
- Please ensure proper handling of path separators for different operating systems.
- Consider edge cases such as home directories (`~`), drive letters (Windows), and hidden files.