-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfish_help
More file actions
379 lines (336 loc) · 14.5 KB
/
fish_help
File metadata and controls
379 lines (336 loc) · 14.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
#!/usr/bin/env fish
#
# fish_help - Help file for the dxsbash Fish environment
#
# This file contains helpful information about commands and shortcuts
# available in the dxsbash Fish environment.
cat << 'EOF'
░█▀▄░█░█░█▀▀░░░█▀▄░█▀█░█▀▀░█░█░░░█░█░█▀▀░█░░░█▀█
░█░█░▄▀▄░▀▀█░░░█▀▄░█▀█░▀▀█░█▀█░░░█▀█░█▀▀░█░░░█▀▀
░▀▀░░▀░▀░▀▀▀░░░▀▀░░▀░▀░▀▀▀░▀░▀░░░▀░▀░▀▀▀░▀▀▀░▀░░
GENERAL COMMANDS
===============
help - Display this help message
help <topic> - Display help for specific topic (git, zsh, fish, etc.)
update - Update system packages
install <pkg> - Install package with system updates
cls - Clear the screen
mkcd <dir> - Create and change to directory
extract <file> - Extract archive regardless of type
trash <file> - Move files to trash instead of deleting
z <dir> - Jump to directories you frequently use (zoxide)
zi - Interactive directory selection with zoxide
whatsmyip - Show internal and external IP addresses
FILE NAVIGATION
==============
l - List files in long format
la - List all files including hidden
ll - Detailed list with permissions
lt - List files sorted by time
lsd - List only directories
lsf - List only files
ff <pattern> - Find files by name
ftext <text> - Search for text in files
countfiles - Count files, links, and directories in current location
GIT SHORTCUTS
============
gs - Git status
gl - Git log
ga - Git add
gc - Git commit
gp - Git push
gpl - Git pull
gb - Git branch
gco - Git checkout
gd - Git diff
grm - Git remove
gg - Git grep
SYSTEM INFO
==========
diskspace - Show disk usage sorted by size
folders - Show top-level folder sizes
folderssort - Sort folders by size
df -h - Show disk free space
free -h - Show memory usage
netinfo - Show network configuration
ports - Show listening ports
topcpu - Show top CPU processes
ver - Show detailed OS version
FILE OPERATIONS
==============
cp - Copy (safer, interactive mode)
mv - Move (safer, interactive mode)
rm - Remove (safer, verbose mode)
mkdir - Create directory (parents automatically)
cpg - Copy and change to destination directory
mvg - Move and change to destination directory
cpp - Copy with progress bar
DIRECTORY NAVIGATION
===================
home - Go to home directory
.. - Go up one directory
... - Go up two directories
.... - Go up three directories
..... - Go up four directories
up N - Go up N directories
bd - Go back to previous directory
FISH-SPECIFIC FEATURES
=====================
• Syntax highlighting as you type
• Autosuggestions from history
• Tab completions with descriptions
• Web-based configuration (fish_config)
• No need for quoting in conditions
• Modern scripting syntax
• Searchable command history (Ctrl+R)
• Abbreviations that expand as you type
ARCHIVE OPERATIONS
=================
mktar <file.tar> - Create tar archive
mkbz2 <file.tar.bz2>- Create bz2 archive
mkgz <file.tar.gz> - Create gz archive
untar <file> - Extract tar archive
unbz2 <file> - Extract bz2 archive
ungz <file> - Extract gz archive
extract <file> - Auto-extract based on extension
SHELL FEATURES
=============
CTRL+R - Search command history
CTRL+F - Launch zoxide interactive
ALT+C - cd into selected directory (fzf)
Tab - Show completions with descriptions
→ - Accept autosuggestion (right arrow)
Alt+→ - Accept word from autosuggestion
MULTI-SHELL SUPPORT
==================
dxsbash supports three shells with equivalent functionality:
bash - Traditional shell
zsh - Z-Shell with enhanced features
fish - Friendly interactive shell (current)
Configuration files:
~/.bashrc - Bash configuration
~/.zshrc - Zsh configuration
~/.config/fish/config.fish - Fish configuration
To change your default shell, use:
chsh -s $(which bash|zsh|fish)
TERMINAL CUSTOMIZATION
=====================
Starship prompt shows:
- Current directory
- Git branch and status
- Programming language versions
- Command execution time
- Error status of previous command
Fastfetch display includes:
- Host information
- OS and kernel details
- CPU and memory stats
- Uptime information
MAINTENANCE COMMANDS
===================
install_fish_support - Install required dependencies
update-dxsbash - Update dxsbash to latest version
reset-shell-profile - Reset to default shell configuration
For more information and updates, visit:
https://github.com/digitalxs/dxsbash
EOF
# Function to show specific help topics
function show_help_topic
switch $argv[1]
case "git"
echo "Git Commands:"
echo " gs - git status"
echo " ga - git add"
echo " gc - git commit"
echo " gp - git push"
echo " gpl - git pull"
echo " gd - git diff"
echo " gl - git log"
echo " gb - git branch"
echo " gco - git checkout"
echo " gg - git grep"
echo " grm - git remove"
echo " gri - git rebase interactive"
echo " gcp - git cherry-pick"
case "zoxide"
echo "Zoxide Commands:"
echo " z <dir> - Jump to a directory you frequently use"
echo " zi - Interactive directory selection"
echo " z - - Go to previous directory"
echo " z .. - Go to parent directory"
echo " z ... - Go to grandparent directory"
echo ""
echo " Keyboard shortcuts:"
echo " CTRL+F - Launch zoxide interactive mode (zi)"
case "fzf"
echo "FZF Commands:"
echo " CTRL+T - Paste selected files/dirs onto command line"
echo " CTRL+R - Search command history"
echo " ALT+C - cd into selected directory"
echo " fzf - Start fzf in current directory"
case "nvim"
echo "Neovim Shortcuts:"
echo " nv - Open neovim"
echo " nvconf - Edit neovim config"
echo " nvplugs - Edit neovim plugins"
echo ""
echo " Inside Neovim:"
echo " <Space> - Leader key"
echo " <Leader>f - Find files"
echo " <Leader>g - Live grep"
echo " <Leader>b - Buffers"
echo " <Leader>h - Help tags"
case "shells"
echo "Shell Support:"
echo " dxsbash supports three shells with equivalent features:"
echo ""
echo " Bash:"
echo " - Most compatible with scripts"
echo " - Configuration: ~/.bashrc"
echo " - Help file: ~/.bashrc_help"
echo ""
echo " Zsh:"
echo " - Enhanced features and plugins"
echo " - Configuration: ~/.zshrc"
echo " - Help file: ~/.zshrc_help"
echo " - Plugins: Oh My Zsh, syntax highlighting, autosuggestions"
echo ""
echo " Fish:"
echo " - Most user-friendly with superior autocompletions"
echo " - Configuration: ~/.config/fish/config.fish"
echo " - Help file: ~/.config/fish/fish_help"
echo " - Plugins: fzf.fish, tide, z"
echo ""
echo " To switch your default shell:"
echo " chsh -s (which bash|zsh|fish)"
case "fishconfig"
echo "Fish Configuration:"
echo " Fish offers several ways to customize your environment:"
echo ""
echo " • Web interface: Run 'fish_config' to open browser configuration"
echo " • Functions: Define functions in ~/.config/fish/functions/"
echo " • Aliases: Create aliases in ~/.config/fish/conf.d/aliases.fish"
echo " • Abbreviations: Create typing shortcuts that expand as you type"
echo " Example: abbr -a g git"
echo ""
echo " Fisher plugin manager:"
echo " • List plugins: fisher list"
echo " • Add plugin: fisher install [plugin]"
echo " • Update plugins: fisher update"
echo ""
echo " Tide prompt:"
echo " • Configure: tide configure"
echo " • Change style: tide --help"
case "kde"
echo "KDE Terminal Integration:"
echo " dxsbash includes special support for KDE terminal emulators:"
echo ""
echo " Konsole:"
echo " - Custom profile with FiraCode Nerd Font"
echo " - Properly displays Starship prompt symbols"
echo " - Configuration: ~/.local/share/konsole/DXSBash.profile"
echo ""
echo " Yakuake:"
echo " - Drop-down terminal with same configuration as Konsole"
echo " - Uses same custom profile with Nerd Font support"
echo " - Configuration: ~/.config/yakuakerc"
echo ""
echo " To reset terminal configuration:"
echo " rm ~/.local/share/konsole/DXSBash.profile"
echo " Then edit ~/.config/konsolerc and ~/.config/yakuakerc"
case "starship"
echo "Starship Prompt Features:"
echo " Starship provides a rich terminal prompt with information:"
echo ""
echo " Git Status:"
echo " - Branch name and status"
echo " - Modified/added/deleted files"
echo " - Ahead/behind remote status"
echo ""
echo " Programming Languages:"
echo " - Shows version of detected language in current directory"
echo " - Supports: Python, Node.js, Go, Rust, Java, and more"
echo ""
echo " System Info:"
echo " - Command execution time for long-running commands"
echo " - Exit status of previous command"
echo " - Username and hostname (when connected via SSH)"
echo ""
echo " Configuration: ~/.config/starship.toml"
case "aliases"
echo "Aliases Categories:"
echo " dxsbash includes many useful aliases to improve productivity:"
echo ""
echo " Navigation:"
echo " - .. ... .... (go up directories)"
echo " - bd (go back to previous directory)"
echo ""
echo " Listing:"
echo " - ls, la, ll, lt (different ls formats)"
echo " - lsd (list directories only)"
echo " - lsf (list files only)"
echo ""
echo " Safety:"
echo " - rm, cp, mv (interactive versions)"
echo " - delete (safer remove with confirmation)"
echo ""
echo " System:"
echo " - update, install (update system)"
echo " - ports, openports (network ports)"
echo ""
echo " Git:"
echo " - ga, gs, gc, gp (git operations)"
echo ""
echo " For complete list, see: ~/.config/fish/conf.d/aliases.fish"
case "update"
echo "Updating DXSBash:"
echo " You can update dxsbash in several ways:"
echo ""
echo " Using the system-wide command:"
echo " > update-dxsbash"
echo ""
echo " Using the home directory shortcut:"
echo " > ~/update-dxsbash.sh"
echo ""
echo " Updates will:"
echo " - Pull latest changes from the repository"
echo " - Update all configuration files"
echo " - Maintain your customizations (in backup)"
echo " - Update shell, KDE, and utility configurations"
echo ""
echo " To see your current version:"
echo " > cat ~/linuxtoolbox/dxsbash/version.txt"
case "reset"
echo "Resetting Your Shell:"
echo " If you need to restore your shell to the default configuration:"
echo ""
echo " > sudo reset-shell-profile [username]"
echo ""
echo " This will:"
echo " - Create a backup of your current configuration"
echo " - Restore the default shell configuration files"
echo " - Remove DXSBash settings and customizations"
echo ""
echo " Note: This will not uninstall any software or remove the"
echo " repository from ~/linuxtoolbox/dxsbash"
case "*"
echo "Available help topics:"
echo " git - Git commands and shortcuts"
echo " zoxide - Directory navigation with zoxide"
echo " fzf - Fuzzy finder usage and shortcuts"
echo " nvim - Neovim editor shortcuts"
echo " shells - Multi-shell support (Bash, Zsh, Fish)"
echo " fishconfig - Fish shell configuration and plugins"
echo " kde - KDE terminal integration"
echo " starship - Starship prompt features"
echo " aliases - Overview of useful aliases"
echo " update - How to update dxsbash"
echo " reset - How to reset your shell configuration"
echo ""
echo "Usage: help <topic>"
end
end
# If arguments are passed to the script, show specific help
if test (count $argv) -gt 0
show_help_topic $argv[1]
end