Troubleshootingο
This page lists common issues and solutions.
Clipboard Empty Errorο
Error:
β οΈ Warning: Clipboard is empty
Solution: Copy some text to clipboard before running PT.
macOS:
echo "Hello World" | pbcopy
Linux:
echo "Hello World" | xclip -selection clipboard
# or
echo "Hello World" | xsel --clipboard --input
Windows:
echo Hello World | clip
No Write Permissionο
Error:
β Error: no write permission in directory
Solution: Check directory permissions or use a different location.
Check current directory permissions:
ls -la # Linux/macOS
icacls . # Windows
Fix permissions:
chmod +w . # Linux/macOS
File Too Largeο
Error:
β Error: clipboard content too large (max 100MB)
Solution: Content exceeds safety limit. Options:
Increase
max_clipboard_sizeinpt.yml(up to 1GB)Save content directly to file without using clipboard
File Not Foundο
Error:
β Error: file not found: config.json
Causes:
File doesnβt exist
File is deeper than 10 directory levels
File is in a
.ptsubdirectory (automatically excluded)Typo in filename
Solutions:
Use absolute path:
pt /full/path/to/config.json
Increase
max_search_depthinpt.yml:max_search_depth: 20
Check filename spelling
Ensure file is not in
.ptdirectory
Delta Not Foundο
Error:
β Error: delta is not installed. Install it from: https://github.com/dandavison/delta
Solution: Install delta for diff functionality.
macOS:
brew install git-delta
Ubuntu/Debian:
sudo apt install git-delta
Arch Linux:
sudo pacman -S git-delta
Fedora/RHEL:
sudo dnf install git-delta
Windows (Chocolatey):
choco install git-delta
Windows (Scoop):
scoop install delta
Config File Issuesο
Warning:
β οΈ Warning: invalid max_clipboard_size, using default
Solution: Check config file syntax and value ranges:
pt config show
Valid ranges:
max_clipboard_size: 1 - 1073741824 (1GB)max_backup_count: 1 - 10000max_filename_length: 1 - 1000max_search_depth: 1 - 100
Content Unchanged (Check Mode)ο
Message:
βΉοΈ Content identical to current file, no changes needed
This is normal behavior. Check mode (-c) prevents unnecessary writes when content hasnβt changed.
To force write anyway, omit the -c flag.
Recursive Search Issuesο
Error:
π Searching for 'file.txt' recursively...
β Error: file not found: file.txt
Possible causes:
File is deeper than 10 directory levels (default)
File is in a
.ptsubdirectory (automatically excluded)Permission issues reading some directories
Typo in filename
Solutions:
Use absolute path:
pt /full/path/to/file.txt
Increase search depth in
pt.yml:max_search_depth: 20
Check file permissions:
ls -la /path/to/file.txt
Verify filename spelling
Multiple File Selectionο
When multiple files are found, PT shows an interactive prompt:
π Found 3 matching file(s)
ββββββββ¬βββββββββββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββ
β # β Path β Modified β Size β
ββββββββΌβββββββββββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββ€
β 1 β ./README.md β 2025-11-15 10:30:00 β 15.2 KB β
β 2 β ./docs/README.md β 2025-11-14 15:20:00 β 8.5 KB β
ββββββββ΄βββββββββββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββ
Enter file number to use (1-3) or 0 to cancel:
Solution: Select the file number you want to work with, or press 0 to cancel.
Linux Clipboard Issuesο
Error:
β Error: failed to read clipboard
Solution: Install clipboard utilities.
Ubuntu/Debian:
sudo apt-get install xclip xsel
Fedora/RHEL:
sudo dnf install xclip xsel
Arch:
sudo pacman -S xclip xsel
After installation, test:
echo "test" | xclip -selection clipboard
pt test.txt
.pt Directory Not Foundο
Message:
π Created .pt directory: /path/to/.pt
This is informational, not an error.
PT creates a .pt directory (Git-like) to store backups. Itβs automatically:
Created in the fileβs directory or parent
Added to
.gitignoreSearched upward like
.git
Backup Directory Confusionο
Issue: Backups not found where expected
Explanation: PT uses a Git-like .pt directory structure:
project/
βββ .pt/ # Git-like backup directory
β βββ main_go/
β β βββ main_go.20251115_...
β βββ config_json/
β βββ config_json.20251115_...
βββ main.go
βββ config.json
The .pt directory is shared across files like .git.
To find where backups are stored:
pt -l myfile.txt
The header shows the backup location.
Windows-Specific Issuesο
Path separator issues: PT handles both / and \ automatically.
Clipboard access: May require PowerShell or WSL on some Windows versions.
Getting Helpο
If you encounter issues not listed here:
Check the full documentation: Usage Reference, Configuration
Run with
--debugfor detailed logs:pt --debug myfile.txt
File an issue on GitHub: https://github.com/cumulus13/pt-go/issues