cleanup
Committed by
GitHub
- SHA
fe412235de8a93402c90ec91fdea353070ea833a- Parents
-
b181446 - Tree
02b6abb
fe41223
fe412235de8a93402c90ec91fdea353070ea833ab181446
02b6abb| Status | File | + | - |
|---|---|---|---|
| D |
USAGE.md
|
0 | 47 |
USAGE.mddeleted@@ -1,47 +0,0 @@ | ||
| 1 | -# Using FORTRESS with CD-on-Exit | |
| 2 | - | |
| 3 | -## Setup (One Time) | |
| 4 | - | |
| 5 | -Add this line to your `~/.bashrc` or `~/.zshrc`: | |
| 6 | - | |
| 7 | -```bash | |
| 8 | -source ~/Documents/GithubOrgs/FortranGoingOnForty/fortress/fortress.sh | |
| 9 | -``` | |
| 10 | - | |
| 11 | -Then reload your shell: | |
| 12 | -```bash | |
| 13 | -source ~/.bashrc # or source ~/.zshrc | |
| 14 | -``` | |
| 15 | - | |
| 16 | -## Usage | |
| 17 | - | |
| 18 | -Instead of running `fpm run`, use the `fortress` command: | |
| 19 | - | |
| 20 | -```bash | |
| 21 | -fortress | |
| 22 | -``` | |
| 23 | - | |
| 24 | -This runs the fortress file explorer. When you're browsing: | |
| 25 | - | |
| 26 | -1. Use `↑↓` to navigate files/directories | |
| 27 | -2. Use `→` to enter a directory | |
| 28 | -3. Use `←` to go back | |
| 29 | -4. **Press `c` on any directory to exit fortress and CD your shell to that directory** | |
| 30 | -5. Press `q` to quit without changing directory | |
| 31 | - | |
| 32 | -## How It Works | |
| 33 | - | |
| 34 | -When you press `c`: | |
| 35 | -1. FORTRESS writes the selected directory path to `~/.fortress_cd` | |
| 36 | -2. FORTRESS exits | |
| 37 | -3. The shell function reads `~/.fortress_cd` and runs `cd` to that directory | |
| 38 | -4. The temp file is cleaned up | |
| 39 | - | |
| 40 | -This is the same pattern used by tools like `fzf`. | |
| 41 | - | |
| 42 | -## Important Notes | |
| 43 | - | |
| 44 | -- ❌ `fpm run` does NOT enable cd-on-exit (it runs directly) | |
| 45 | -- ✅ `fortress` command DOES enable cd-on-exit (uses the shell function) | |
| 46 | -- You must source `fortress.sh` in your shell config for this to work | |
| 47 | -- This only works in interactive shells, not in scripts | |