Compare commits
83 Commits
Author | SHA1 | Date |
---|---|---|
|
72693e646d | |
|
2cf7e234e9 | |
|
c241963f56 | |
|
d644581eb2 | |
|
0d9a365ddc | |
|
a8209d299c | |
|
5282ae9679 | |
|
806d7242b9 | |
|
1cf4f79ab1 | |
|
39722ea19f | |
|
1efed5c274 | |
|
698621d984 | |
|
4fe2ba1fa8 | |
|
a477e89b80 | |
|
02dd9c13be | |
|
1ed1614b70 | |
|
1c6d2f5848 | |
|
581995fd68 | |
|
f7d89ec656 | |
|
0c51473d17 | |
|
23d964d42f | |
|
9933fdd1ff | |
|
a4feb6d5c0 | |
|
0131eb3f8c | |
|
b731c6e237 | |
|
f461e4ac4d | |
|
d5236bca30 | |
|
1342bbd614 | |
|
e0575fce85 | |
|
acd2a741b1 | |
|
ab2faa658b | |
|
b6a8077bc5 | |
|
de57597120 | |
|
ba3b2ac1c9 | |
|
ac2076fc03 | |
|
a991769cef | |
|
77aa12bf56 | |
|
b737c6a9cb | |
|
8dd89735ef | |
|
9d19d81a6f | |
|
34a61fe1f9 | |
|
7d4e261254 | |
|
2ecd846ad6 | |
|
f695029b5f | |
|
e12b0f4122 | |
|
68a746d86f | |
|
a72e723767 | |
|
96bea3fc03 | |
|
6735fe558f | |
|
1a072c98a9 | |
|
6123945230 | |
|
ea70ac6c9a | |
|
8b83502ad1 | |
|
e33695df5f | |
|
98fd1537b9 | |
|
04d999f3a6 | |
|
bb2ad39fcb | |
|
cfc3b76332 | |
|
67ed9cc3c9 | |
|
049eb9ee83 | |
|
0ca559ef2d | |
|
2a7b606cc2 | |
|
243cc8140f | |
|
cbea004fa4 | |
|
41d3750d24 | |
|
3bf1da9427 | |
|
e7ab5fd04f | |
|
8e1ed5b9f4 | |
|
3ed8025e04 | |
|
9e56e7ba85 | |
|
b0bbea6df8 | |
|
305caf398a | |
|
a8509c0fc5 | |
|
6f6869f2d1 | |
|
fce979746f | |
|
a3bad528c6 | |
|
8f47acb27f | |
|
6a4cf826c6 | |
|
2fed831835 | |
|
e2d93f1f08 | |
|
b7d2647b2a | |
|
36f8e1838c | |
|
164665aa02 |
|
@ -1,4 +1,4 @@
|
||||||
#? Config file for btop v. 1.2.13
|
#? Config file for btop v. 1.3.0
|
||||||
|
|
||||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||||
|
@ -37,6 +37,9 @@ graph_symbol = "block"
|
||||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
graph_symbol_cpu = "default"
|
graph_symbol_cpu = "default"
|
||||||
|
|
||||||
|
# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty".
|
||||||
|
graph_symbol_gpu = "default"
|
||||||
|
|
||||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
graph_symbol_mem = "default"
|
graph_symbol_mem = "default"
|
||||||
|
|
||||||
|
@ -46,7 +49,7 @@ graph_symbol_net = "default"
|
||||||
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
graph_symbol_proc = "default"
|
graph_symbol_proc = "default"
|
||||||
|
|
||||||
#* Manually set which boxes to show. Available values are "cpu mem net proc", separate values with whitespace.
|
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
||||||
shown_boxes = "cpu mem net proc"
|
shown_boxes = "cpu mem net proc"
|
||||||
|
|
||||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||||
|
@ -54,7 +57,7 @@ update_ms = 1000
|
||||||
|
|
||||||
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||||
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
proc_sorting = "cpu lazy"
|
proc_sorting = "cpu direct"
|
||||||
|
|
||||||
#* Reverse sorting order, True or False.
|
#* Reverse sorting order, True or False.
|
||||||
proc_reversed = False
|
proc_reversed = False
|
||||||
|
@ -84,7 +87,10 @@ proc_info_smaps = False
|
||||||
proc_left = False
|
proc_left = False
|
||||||
|
|
||||||
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||||
proc_filter_kernel = True
|
proc_filter_kernel = False
|
||||||
|
|
||||||
|
#* In tree-view, always accumulate child process resources in the parent process.
|
||||||
|
proc_aggregate = False
|
||||||
|
|
||||||
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
||||||
#* Select from a list of detected attributes from the options menu.
|
#* Select from a list of detected attributes from the options menu.
|
||||||
|
@ -94,6 +100,9 @@ cpu_graph_upper = "total"
|
||||||
#* Select from a list of detected attributes from the options menu.
|
#* Select from a list of detected attributes from the options menu.
|
||||||
cpu_graph_lower = "user"
|
cpu_graph_lower = "user"
|
||||||
|
|
||||||
|
#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off".
|
||||||
|
show_gpu_info = "Auto"
|
||||||
|
|
||||||
#* Toggles if the lower CPU graph should be inverted.
|
#* Toggles if the lower CPU graph should be inverted.
|
||||||
cpu_invert_lower = False
|
cpu_invert_lower = False
|
||||||
|
|
||||||
|
@ -178,7 +187,7 @@ disk_free_priv = False
|
||||||
show_io_stat = True
|
show_io_stat = True
|
||||||
|
|
||||||
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
||||||
io_mode = False
|
io_mode = True
|
||||||
|
|
||||||
#* Set to True to show combined read/write io graphs in io mode.
|
#* Set to True to show combined read/write io graphs in io mode.
|
||||||
io_graph_combined = False
|
io_graph_combined = False
|
||||||
|
@ -193,7 +202,7 @@ net_download = 1000
|
||||||
net_upload = 100
|
net_upload = 100
|
||||||
|
|
||||||
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
||||||
net_auto = True
|
net_auto = False
|
||||||
|
|
||||||
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
||||||
net_sync = True
|
net_sync = True
|
||||||
|
@ -209,4 +218,28 @@ selected_battery = "Auto"
|
||||||
|
|
||||||
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||||
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
||||||
log_level = "WARNING"
|
log_level = "WARNING"
|
||||||
|
|
||||||
|
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
||||||
|
nvml_measure_pcie_speeds = True
|
||||||
|
|
||||||
|
#* Horizontally mirror the GPU graph.
|
||||||
|
gpu_mirror_graph = True
|
||||||
|
|
||||||
|
#* Custom gpu0 model name, empty string to disable.
|
||||||
|
custom_gpu_name0 = ""
|
||||||
|
|
||||||
|
#* Custom gpu1 model name, empty string to disable.
|
||||||
|
custom_gpu_name1 = ""
|
||||||
|
|
||||||
|
#* Custom gpu2 model name, empty string to disable.
|
||||||
|
custom_gpu_name2 = ""
|
||||||
|
|
||||||
|
#* Custom gpu3 model name, empty string to disable.
|
||||||
|
custom_gpu_name3 = ""
|
||||||
|
|
||||||
|
#* Custom gpu4 model name, empty string to disable.
|
||||||
|
custom_gpu_name4 = ""
|
||||||
|
|
||||||
|
#* Custom gpu5 model name, empty string to disable.
|
||||||
|
custom_gpu_name5 = ""
|
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
||||||
Subproject commit 84e4a0a20bb82841db6c144dd4a2ff64e532e11f
|
Subproject commit 83cd783ecd1943aea2b820b9f4d73deab8cb5969
|
|
@ -0,0 +1 @@
|
||||||
|
edition = "2021"
|
|
@ -0,0 +1,373 @@
|
||||||
|
[ActivityManager][Global Shortcuts]
|
||||||
|
switch-to-activity-=
|
||||||
|
switch-to-activity-9497743c-b928-4711-9a15-88ae73a36745=
|
||||||
|
switch-to-activity-b81d941f-2f97-41a3-ad5f-a685736616e0=
|
||||||
|
|
||||||
|
[KDE Keyboard Layout Switcher][Global Shortcuts]
|
||||||
|
Switch keyboard layout to German=
|
||||||
|
Switch to Next Keyboard Layout=Ctrl+Alt+K
|
||||||
|
|
||||||
|
[StandardShortcuts]
|
||||||
|
AboutApp=
|
||||||
|
AboutKDE=
|
||||||
|
Activate Next Tab=Ctrl+PgDown; Ctrl+]
|
||||||
|
Activate Previous Tab=Ctrl+PgUp; Ctrl+[
|
||||||
|
ActualSize=Ctrl+0
|
||||||
|
AddBookmark=Ctrl+B
|
||||||
|
Back=Back; Alt+Left
|
||||||
|
BackwardWord=Ctrl+Left
|
||||||
|
Begin=Ctrl+Home
|
||||||
|
BeginningOfLine=Home
|
||||||
|
Clear=
|
||||||
|
Close=Ctrl+W; Ctrl+Esc
|
||||||
|
ConfigureNotifications=
|
||||||
|
ConfigureToolbars=
|
||||||
|
Copy=Ctrl+Ins; Ctrl+C
|
||||||
|
CreateFolder=F10
|
||||||
|
Cut=Ctrl+X; Shift+Del
|
||||||
|
DeleteFile=Shift+Del
|
||||||
|
DeleteWordBack=Ctrl+Backspace
|
||||||
|
DeleteWordForward=Ctrl+Del
|
||||||
|
Deselect=Ctrl+Shift+A
|
||||||
|
DocumentBack=Alt+Shift+Left
|
||||||
|
DocumentForward=Alt+Shift+Right
|
||||||
|
Donate=
|
||||||
|
EditBookmarks=
|
||||||
|
End=Ctrl+End
|
||||||
|
EndOfLine=End
|
||||||
|
Find=Ctrl+F
|
||||||
|
FindNext=F3
|
||||||
|
FindPrev=Shift+F3
|
||||||
|
FitToHeight=
|
||||||
|
FitToPage=
|
||||||
|
FitToWidth=
|
||||||
|
Forward=Alt+Right; Forward
|
||||||
|
ForwardWord=Ctrl+Right
|
||||||
|
FullScreen=Ctrl+Shift+F
|
||||||
|
Goto=
|
||||||
|
GotoLine=Ctrl+G
|
||||||
|
GotoPage=
|
||||||
|
Help=F1
|
||||||
|
Home=Alt+Home; Home Page
|
||||||
|
KeyBindings=Ctrl+Alt+,
|
||||||
|
Mail=
|
||||||
|
MoveToTrash=Del
|
||||||
|
New=Ctrl+N
|
||||||
|
Next=PgDown
|
||||||
|
NextCompletion=Ctrl+Down
|
||||||
|
Open=Ctrl+O
|
||||||
|
OpenRecent=
|
||||||
|
Paste=Ctrl+V; Shift+Ins
|
||||||
|
Paste Selection=Ctrl+Shift+Ins
|
||||||
|
Preferences=Ctrl+Shift+,
|
||||||
|
PrevCompletion=Ctrl+Up
|
||||||
|
Print=Ctrl+P
|
||||||
|
PrintPreview=
|
||||||
|
Prior=PgUp
|
||||||
|
Quit=Ctrl+Q
|
||||||
|
Redo=Ctrl+Shift+Z
|
||||||
|
Reload=Refresh; F5
|
||||||
|
RenameFile=F2
|
||||||
|
Replace=Ctrl+R
|
||||||
|
ReportBug=
|
||||||
|
Revert=
|
||||||
|
RotateDown=Down
|
||||||
|
RotateUp=Up
|
||||||
|
Save=Ctrl+S
|
||||||
|
SaveAs=Ctrl+Shift+S
|
||||||
|
SaveOptions=
|
||||||
|
SelectAll=Ctrl+A
|
||||||
|
ShowHideHiddenFiles=Alt+.; Ctrl+H
|
||||||
|
ShowMenubar=Ctrl+M
|
||||||
|
ShowStatusbar=
|
||||||
|
ShowToolbar=
|
||||||
|
Spelling=
|
||||||
|
SubstringCompletion=Ctrl+T
|
||||||
|
SwitchApplicationLanguage=
|
||||||
|
TextCompletion=Ctrl+E
|
||||||
|
TipofDay=
|
||||||
|
Undo=Ctrl+Z
|
||||||
|
Up=Alt+Up
|
||||||
|
WhatsThis=Shift+F1
|
||||||
|
Zoom=
|
||||||
|
ZoomIn=Ctrl+=; Ctrl++
|
||||||
|
ZoomOut=Ctrl+-
|
||||||
|
|
||||||
|
[discord-screenaudio][Global Shortcuts]
|
||||||
|
toggleDeafen=
|
||||||
|
toggleMute=
|
||||||
|
|
||||||
|
[kaccess][Global Shortcuts]
|
||||||
|
Toggle Screen Reader On and Off=Meta+Alt+S
|
||||||
|
|
||||||
|
[kcm_touchpad][Global Shortcuts]
|
||||||
|
Disable Touchpad=Touchpad Off
|
||||||
|
Enable Touchpad=Touchpad On
|
||||||
|
Toggle Touchpad=Touchpad Toggle
|
||||||
|
|
||||||
|
[kded5][Global Shortcuts]
|
||||||
|
Show System Activity=Ctrl+Esc
|
||||||
|
display=Meta+P; Display
|
||||||
|
|
||||||
|
[khotkeys][Global Shortcuts]
|
||||||
|
{90040de6-4095-4f8e-b05b-8c65f08be0c0}=
|
||||||
|
{d03619b6-9b3c-48cc-9d9c-a2aadb485550}=
|
||||||
|
|
||||||
|
[kitty.desktop][Global Shortcuts]
|
||||||
|
_launch=Ctrl+Alt+T
|
||||||
|
|
||||||
|
[kmix][Global Shortcuts]
|
||||||
|
decrease_microphone_volume=Microphone Volume Down
|
||||||
|
decrease_volume=Volume Down
|
||||||
|
increase_microphone_volume=Microphone Volume Up
|
||||||
|
increase_volume=Volume Up
|
||||||
|
mic_mute=Microphone Mute; Meta+Volume Mute
|
||||||
|
mute=Volume Mute
|
||||||
|
|
||||||
|
[ksmserver][Global Shortcuts]
|
||||||
|
Halt Without Confirmation=
|
||||||
|
Lock Session=Screensaver; Meta+L; Ctrl+Alt+L
|
||||||
|
Log Out=Ctrl+Alt+Del
|
||||||
|
Log Out Without Confirmation=
|
||||||
|
Reboot Without Confirmation=
|
||||||
|
|
||||||
|
[kwin][Global Shortcuts]
|
||||||
|
Activate Window Demanding Attention=Ctrl+Alt+A
|
||||||
|
Decrease Opacity=
|
||||||
|
Expose=Ctrl+F9
|
||||||
|
ExposeAll=Launch (C); Ctrl+F10
|
||||||
|
ExposeClass=Ctrl+F7
|
||||||
|
Increase Opacity=
|
||||||
|
Invert Screen Colors=
|
||||||
|
Kill Window=Ctrl+Alt+Esc
|
||||||
|
MoveMouseToCenter=Meta+F6
|
||||||
|
MoveMouseToFocus=Meta+F5
|
||||||
|
MoveZoomDown=
|
||||||
|
MoveZoomLeft=
|
||||||
|
MoveZoomRight=
|
||||||
|
MoveZoomUp=
|
||||||
|
Setup Window Shortcut=
|
||||||
|
Show Desktop=Meta+D
|
||||||
|
ShowDesktopGrid=Ctrl+F8
|
||||||
|
Suspend Compositing=Alt+Shift+F12
|
||||||
|
Switch One Desktop Down=Ctrl+Alt+Down
|
||||||
|
Switch One Desktop Up=Ctrl+Alt+Up
|
||||||
|
Switch One Desktop to the Left=Ctrl+Alt+Left
|
||||||
|
Switch One Desktop to the Right=Ctrl+Alt+Right
|
||||||
|
Switch Window Down=Meta+Alt+Down
|
||||||
|
Switch Window Left=Meta+Alt+Left
|
||||||
|
Switch Window Right=Meta+Alt+Right
|
||||||
|
Switch Window Up=Meta+Alt+Up
|
||||||
|
Switch to Desktop 1=Ctrl+Alt+1; Ctrl+F1
|
||||||
|
Switch to Desktop 10=Ctrl+Alt+0
|
||||||
|
Switch to Desktop 11=
|
||||||
|
Switch to Desktop 12=
|
||||||
|
Switch to Desktop 13=
|
||||||
|
Switch to Desktop 14=
|
||||||
|
Switch to Desktop 15=
|
||||||
|
Switch to Desktop 16=
|
||||||
|
Switch to Desktop 17=
|
||||||
|
Switch to Desktop 18=
|
||||||
|
Switch to Desktop 19=
|
||||||
|
Switch to Desktop 2=Ctrl+F2; Ctrl+Alt+2
|
||||||
|
Switch to Desktop 20=
|
||||||
|
Switch to Desktop 3=Ctrl+F3; Ctrl+Alt+3
|
||||||
|
Switch to Desktop 4=Ctrl+F4; Ctrl+Alt+4
|
||||||
|
Switch to Desktop 5=Ctrl+Alt+5
|
||||||
|
Switch to Desktop 6=Ctrl+Alt+6
|
||||||
|
Switch to Desktop 7=Ctrl+Alt+7
|
||||||
|
Switch to Desktop 8=Ctrl+Alt+8
|
||||||
|
Switch to Desktop 9=Ctrl+Alt+9
|
||||||
|
Switch to Next Desktop=
|
||||||
|
Switch to Next Screen=
|
||||||
|
Switch to Previous Desktop=
|
||||||
|
Switch to Previous Screen=
|
||||||
|
Switch to Screen 0=
|
||||||
|
Switch to Screen 1=
|
||||||
|
Switch to Screen 2=
|
||||||
|
Switch to Screen 3=
|
||||||
|
Switch to Screen 4=
|
||||||
|
Switch to Screen 5=
|
||||||
|
Switch to Screen 6=
|
||||||
|
Switch to Screen 7=
|
||||||
|
Toggle Night Color=
|
||||||
|
Toggle Window Raise/Lower=
|
||||||
|
Walk Through Desktop List=
|
||||||
|
Walk Through Desktop List (Reverse)=
|
||||||
|
Walk Through Desktops=
|
||||||
|
Walk Through Desktops (Reverse)=
|
||||||
|
Walk Through Windows=Alt+Tab
|
||||||
|
Walk Through Windows (Reverse)=Alt+Shift+Backtab
|
||||||
|
Walk Through Windows Alternative=
|
||||||
|
Walk Through Windows Alternative (Reverse)=
|
||||||
|
Walk Through Windows of Current Application=Alt+`
|
||||||
|
Walk Through Windows of Current Application (Reverse)=Alt+~
|
||||||
|
Walk Through Windows of Current Application Alternative=
|
||||||
|
Walk Through Windows of Current Application Alternative (Reverse)=
|
||||||
|
Window Above Other Windows=Alt+F8
|
||||||
|
Window Below Other Windows=Alt+F7
|
||||||
|
Window Close=Alt+F4
|
||||||
|
Window Fullscreen=Alt+F11
|
||||||
|
Window Grow Horizontal=
|
||||||
|
Window Grow Vertical=
|
||||||
|
Window Lower=
|
||||||
|
Window Maximize=Meta+PgUp; Alt+F10
|
||||||
|
Window Maximize Horizontal=
|
||||||
|
Window Maximize Vertical=
|
||||||
|
Window Minimize=Meta+PgDown
|
||||||
|
Window Move=
|
||||||
|
Window Move Center=
|
||||||
|
Window No Border=
|
||||||
|
Window On All Desktops=Alt+F9
|
||||||
|
Window One Desktop Down=Meta+Ctrl+Shift+Down
|
||||||
|
Window One Desktop Up=Meta+Ctrl+Shift+Up
|
||||||
|
Window One Desktop to the Left=Meta+Ctrl+Shift+Left
|
||||||
|
Window One Desktop to the Right=Meta+Ctrl+Shift+Right
|
||||||
|
Window Operations Menu=Alt+F3
|
||||||
|
Window Pack Down=
|
||||||
|
Window Pack Left=
|
||||||
|
Window Pack Right=
|
||||||
|
Window Pack Up=
|
||||||
|
Window Quick Tile Bottom=Meta+Down
|
||||||
|
Window Quick Tile Bottom Left=
|
||||||
|
Window Quick Tile Bottom Right=
|
||||||
|
Window Quick Tile Left=Meta+Left
|
||||||
|
Window Quick Tile Right=Meta+Right
|
||||||
|
Window Quick Tile Top=Meta+Up
|
||||||
|
Window Quick Tile Top Left=
|
||||||
|
Window Quick Tile Top Right=
|
||||||
|
Window Raise=
|
||||||
|
Window Resize=
|
||||||
|
Window Shade=
|
||||||
|
Window Shrink Horizontal=
|
||||||
|
Window Shrink Vertical=
|
||||||
|
Window to Desktop 1=Ctrl+Alt+!
|
||||||
|
Window to Desktop 10=Ctrl+Alt+=
|
||||||
|
Window to Desktop 11=
|
||||||
|
Window to Desktop 12=
|
||||||
|
Window to Desktop 13=
|
||||||
|
Window to Desktop 14=
|
||||||
|
Window to Desktop 15=
|
||||||
|
Window to Desktop 16=
|
||||||
|
Window to Desktop 17=
|
||||||
|
Window to Desktop 18=
|
||||||
|
Window to Desktop 19=
|
||||||
|
Window to Desktop 2=Ctrl+Alt+"
|
||||||
|
Window to Desktop 20=
|
||||||
|
Window to Desktop 3=Ctrl+Alt+§
|
||||||
|
Window to Desktop 4=Ctrl+Alt+$
|
||||||
|
Window to Desktop 5=Ctrl+Alt+%
|
||||||
|
Window to Desktop 6=Ctrl+Alt+&
|
||||||
|
Window to Desktop 7=Ctrl+Alt+/
|
||||||
|
Window to Desktop 8=Ctrl+Alt+(
|
||||||
|
Window to Desktop 9=Ctrl+Alt+)
|
||||||
|
Window to Next Desktop=Ctrl+Alt+Shift+Right
|
||||||
|
Window to Next Screen=Meta+Shift+Right
|
||||||
|
Window to Previous Desktop=Ctrl+Alt+Shift+Left
|
||||||
|
Window to Previous Screen=Meta+Shift+Left
|
||||||
|
Window to Screen 0=
|
||||||
|
Window to Screen 1=
|
||||||
|
Window to Screen 2=
|
||||||
|
Window to Screen 3=
|
||||||
|
Window to Screen 4=
|
||||||
|
Window to Screen 5=
|
||||||
|
Window to Screen 6=
|
||||||
|
Window to Screen 7=
|
||||||
|
view_actual_size=Meta+0
|
||||||
|
view_zoom_in=Meta+=
|
||||||
|
view_zoom_out=Meta+-
|
||||||
|
|
||||||
|
[mediacontrol][Global Shortcuts]
|
||||||
|
mediavolumedown=
|
||||||
|
mediavolumeup=
|
||||||
|
nextmedia=Media Next
|
||||||
|
pausemedia=Media Pause
|
||||||
|
playmedia=
|
||||||
|
playpausemedia=Media Play
|
||||||
|
previousmedia=Media Previous
|
||||||
|
stopmedia=Media Stop
|
||||||
|
|
||||||
|
[org.kde.dolphin.desktop][Global Shortcuts]
|
||||||
|
_launch=Meta+E
|
||||||
|
|
||||||
|
[org.kde.krunner.desktop][Global Shortcuts]
|
||||||
|
RunClipboard=Alt+Shift+F2
|
||||||
|
_launch=Search; Alt+Space; Alt+F2
|
||||||
|
|
||||||
|
[org.kde.plasma.emojier.desktop][Global Shortcuts]
|
||||||
|
_launch=Meta+.
|
||||||
|
|
||||||
|
[org.kde.spectacle.desktop][Global Shortcuts]
|
||||||
|
ActiveWindowScreenShot=Meta+Print
|
||||||
|
CurrentMonitorScreenShot=
|
||||||
|
FullScreenScreenShot=
|
||||||
|
OpenWithoutScreenshot=
|
||||||
|
RectangularRegionScreenShot=Meta+Shift+Print; Print
|
||||||
|
WindowUnderCursorScreenShot=Meta+Ctrl+Print
|
||||||
|
_launch=Shift+Print
|
||||||
|
|
||||||
|
[org_kde_powerdevil][Global Shortcuts]
|
||||||
|
Decrease Keyboard Brightness=Keyboard Brightness Down
|
||||||
|
Decrease Screen Brightness=Monitor Brightness Down
|
||||||
|
Hibernate=Hibernate
|
||||||
|
Increase Keyboard Brightness=Keyboard Brightness Up
|
||||||
|
Increase Screen Brightness=Monitor Brightness Up
|
||||||
|
PowerDown=Power Down
|
||||||
|
PowerOff=Power Off
|
||||||
|
Sleep=Sleep
|
||||||
|
Toggle Keyboard Backlight=Keyboard Light On/Off
|
||||||
|
Turn Off Screen=
|
||||||
|
|
||||||
|
[plasmashell][Global Shortcuts]
|
||||||
|
activate task manager entry 1=Meta+1
|
||||||
|
activate task manager entry 10=
|
||||||
|
activate task manager entry 2=Meta+2
|
||||||
|
activate task manager entry 3=Meta+3
|
||||||
|
activate task manager entry 4=Meta+4
|
||||||
|
activate task manager entry 5=Meta+5
|
||||||
|
activate task manager entry 6=Meta+6
|
||||||
|
activate task manager entry 7=Meta+7
|
||||||
|
activate task manager entry 8=Meta+8
|
||||||
|
activate task manager entry 9=Meta+9
|
||||||
|
activate widget 18=Meta+C
|
||||||
|
activate widget 26=
|
||||||
|
activate widget 3=Alt+F1
|
||||||
|
activate widget 47=
|
||||||
|
activate widget 75=
|
||||||
|
clear-history=
|
||||||
|
clipboard_action=Ctrl+Alt+X
|
||||||
|
cycleNextAction=
|
||||||
|
cyclePrevAction=
|
||||||
|
edit_clipboard=
|
||||||
|
manage activities=Meta+Q
|
||||||
|
next activity=Meta+Tab; Meta+A
|
||||||
|
previous activity=Meta+Shift+Tab
|
||||||
|
repeat_action=Ctrl+Alt+R
|
||||||
|
show dashboard=Ctrl+F12
|
||||||
|
show-barcode=
|
||||||
|
show-on-mouse-pos=Meta+V
|
||||||
|
stop current activity=Meta+S
|
||||||
|
switch to next activity=
|
||||||
|
switch to previous activity=
|
||||||
|
toggle do not disturb=
|
||||||
|
|
||||||
|
[systemsettings.desktop][Global Shortcuts]
|
||||||
|
_launch=Tools
|
||||||
|
kcm-kscreen=
|
||||||
|
kcm-lookandfeel=
|
||||||
|
kcm-users=
|
||||||
|
powerdevilprofilesconfig=
|
||||||
|
screenlocker=
|
||||||
|
|
||||||
|
[wacomtablet][Global Shortcuts]
|
||||||
|
Map to fullscreen=Meta+Ctrl+F
|
||||||
|
Map to screen 1=Meta+Ctrl+1
|
||||||
|
Map to screen 2=Meta+Ctrl+2
|
||||||
|
Next Profile=Meta+Ctrl+N
|
||||||
|
Previous Profile=Meta+Ctrl+P
|
||||||
|
Toggle screen map selection=Meta+Ctrl+M
|
||||||
|
Toggle stylus mode=Meta+Ctrl+S
|
||||||
|
Toggle touch tool=Meta+Ctrl+T
|
||||||
|
|
||||||
|
[yakuake][Global Shortcuts]
|
||||||
|
toggle-window-state=Shift+F12
|
|
@ -0,0 +1,15 @@
|
||||||
|
# This file is written by xdg-user-dirs-update
|
||||||
|
# If you want to change or add directories, just edit the line you're
|
||||||
|
# interested in. All local changes will be retained on the next run.
|
||||||
|
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||||
|
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||||
|
# absolute path. No other format is supported.
|
||||||
|
#
|
||||||
|
XDG_DESKTOP_DIR="$HOME/Desktop/"
|
||||||
|
XDG_DOWNLOAD_DIR="$HOME/Downloads"
|
||||||
|
XDG_TEMPLATES_DIR="$HOME/Templates"
|
||||||
|
XDG_PUBLICSHARE_DIR="$HOME/"
|
||||||
|
XDG_DOCUMENTS_DIR="$HOME/Documents"
|
||||||
|
XDG_MUSIC_DIR="$HOME/"
|
||||||
|
XDG_PICTURES_DIR="$HOME/Pictures"
|
||||||
|
XDG_VIDEOS_DIR="$HOME/Videos"
|
|
@ -0,0 +1,135 @@
|
||||||
|
// Zed keymap
|
||||||
|
//
|
||||||
|
// For information on binding keys, see the Zed
|
||||||
|
// documentation: https://zed.dev/docs/key-bindings
|
||||||
|
//
|
||||||
|
// To see the default key bindings run `zed: open default keymap`
|
||||||
|
// from the command palette.
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"bindings": {
|
||||||
|
"shift-tab": "menu::SelectPrev",
|
||||||
|
"tab": "menu::SelectNext",
|
||||||
|
"alt-c": "pane::CloseActiveItem",
|
||||||
|
"ctrl-shift-w": null,
|
||||||
|
"ctrl-q": null,
|
||||||
|
"ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
|
||||||
|
"ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
|
||||||
|
"ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
|
||||||
|
"ctrl-j": ["workspace::ActivatePaneInDirection", "Down"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Workspace",
|
||||||
|
"bindings": {
|
||||||
|
"f5": "workspace::ToggleLeftDock",
|
||||||
|
"alt-v": "terminal_panel::ToggleFocus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "menu",
|
||||||
|
"bindings": {
|
||||||
|
"shift-tab": "menu::SelectPrev",
|
||||||
|
"tab": "menu::SelectNext",
|
||||||
|
"f4": "menu::SelectPrev",
|
||||||
|
"f6": "menu::SelectNext"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Terminal",
|
||||||
|
"bindings": {
|
||||||
|
"alt-v": "workspace::ToggleBottomDock",
|
||||||
|
"ctrl-w": "terminal::ToggleViMode"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor",
|
||||||
|
"bindings": {
|
||||||
|
"alt-enter": "repl::Run"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "VimControl && !menu",
|
||||||
|
"bindings": {
|
||||||
|
"; f s": "outline::Toggle",
|
||||||
|
"; f w": "workspace::NewSearch",
|
||||||
|
"; f t": "theme_selector::Toggle",
|
||||||
|
"; f f": "file_finder::Toggle",
|
||||||
|
"L": "vim::EndOfLine",
|
||||||
|
"H": "vim::StartOfLine",
|
||||||
|
"left": "editor::TabPrev",
|
||||||
|
"right": "editor::Indent",
|
||||||
|
"space v": "editor::ToggleComments",
|
||||||
|
"alt-j": "vim::ScrollDown",
|
||||||
|
"alt-k": "vim::ScrollUp",
|
||||||
|
"up": "editor::MoveLineUp",
|
||||||
|
"down": "editor::MoveLineDown",
|
||||||
|
"space c a": "editor::ToggleCodeActions",
|
||||||
|
"space y": "editor::Copy",
|
||||||
|
"space p": "editor::Paste",
|
||||||
|
"tab": "pane::ActivateNextItem",
|
||||||
|
"shift-tab": "pane::ActivatePrevItem",
|
||||||
|
"space \"": "pane::SplitRight",
|
||||||
|
"space %": "pane::SplitHorizontal",
|
||||||
|
"space c r": "editor::Rename",
|
||||||
|
"space c t r": "diagnostics::Deploy",
|
||||||
|
"#": [
|
||||||
|
"vim::PushOperator",
|
||||||
|
{
|
||||||
|
"Jump": {
|
||||||
|
"line": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "vim_mode == normal",
|
||||||
|
"bindings": {
|
||||||
|
"space g g": [
|
||||||
|
"task::Spawn",
|
||||||
|
{
|
||||||
|
"task_name": "lazygit",
|
||||||
|
"reveal_target": "center"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"space f f": "editor::Format"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "vim_mode == insert",
|
||||||
|
"bindings": {
|
||||||
|
"ctrl-l": "vim::Right",
|
||||||
|
"ctrl-h": "vim::Left",
|
||||||
|
"ctrl-j": "vim::Down",
|
||||||
|
"ctrl-k": "vim::Up"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "Editor && (showing_code_actions || showing_completions)",
|
||||||
|
"bindings": {
|
||||||
|
"shift-tab": "editor::ContextMenuPrev",
|
||||||
|
"tab": "editor::ContextMenuNext"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"context": "ProjectPanel && not_editing",
|
||||||
|
"bindings": {
|
||||||
|
"n": "project_panel::NewFile",
|
||||||
|
"N": "project_panel::NewDirectory",
|
||||||
|
"r": "project_panel::Rename",
|
||||||
|
"d": [
|
||||||
|
"project_panel::Trash",
|
||||||
|
{
|
||||||
|
"skip_prompt": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"D": [
|
||||||
|
"project_panel::Delete",
|
||||||
|
{
|
||||||
|
"skip_prompt": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,116 @@
|
||||||
|
// Zed settings
|
||||||
|
//
|
||||||
|
// For information on how to configure Zed, see the Zed
|
||||||
|
// documentation: https://zed.dev/docs/configuring-zed
|
||||||
|
//
|
||||||
|
// To see all of Zed's default settings without changing your
|
||||||
|
// custom settings, run `zed: open default settings` from the
|
||||||
|
// command palette (cmd-shift-p / ctrl-shift-p)
|
||||||
|
{
|
||||||
|
"vim": {
|
||||||
|
"use_system_clipboard": "on_yank"
|
||||||
|
},
|
||||||
|
"relative_line_numbers": true,
|
||||||
|
"features": {
|
||||||
|
"inline_completion_provider": "none"
|
||||||
|
},
|
||||||
|
"assistant": {
|
||||||
|
"default_model": {
|
||||||
|
"provider": "zed.dev",
|
||||||
|
"model": "claude-3-5-sonnet-latest"
|
||||||
|
},
|
||||||
|
"dock": "right",
|
||||||
|
"version": "2"
|
||||||
|
},
|
||||||
|
"buffer_font_size": 18,
|
||||||
|
"format_on_save": "prettier",
|
||||||
|
"formatter": "prettier",
|
||||||
|
"buffer_font_family": "FiraCode Nerd Font",
|
||||||
|
"tab_size": 4,
|
||||||
|
"vim_mode": true,
|
||||||
|
"ui_font_size": 15,
|
||||||
|
"theme": {
|
||||||
|
"mode": "system",
|
||||||
|
"light": "One Light",
|
||||||
|
"dark": "Tokyo Night"
|
||||||
|
},
|
||||||
|
"lsp": {
|
||||||
|
"rust-analyzer": {
|
||||||
|
"initialization_options": {
|
||||||
|
"check": {
|
||||||
|
"command": "clippy" // rust-analyzer.checkOnSave.command
|
||||||
|
},
|
||||||
|
"checkOnSave": {
|
||||||
|
"command": "clippy" // rust-analyzer.checkOnSave.command
|
||||||
|
},
|
||||||
|
"inlayHints": {
|
||||||
|
"maxLength": null,
|
||||||
|
"lifetimeElisionHints": {
|
||||||
|
"enable": "skip_trivial",
|
||||||
|
"useParameterNames": true
|
||||||
|
},
|
||||||
|
"closureReturnTypeHints": {
|
||||||
|
"enable": "always"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"diagnostics": {
|
||||||
|
"experimental": {
|
||||||
|
"enable": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cargo": {
|
||||||
|
"features": "all",
|
||||||
|
"allTargets": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ruff": {
|
||||||
|
"initialization_options": {
|
||||||
|
"settings": {
|
||||||
|
// Ruff server settings goes here
|
||||||
|
"lineLength": 80,
|
||||||
|
"lint": {
|
||||||
|
"extendSelect": ["I"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"soft_wrap": "editor_width",
|
||||||
|
"show_wrap_guides": true,
|
||||||
|
"wrap_guides": [80],
|
||||||
|
"languages": {
|
||||||
|
"Jinja2": {
|
||||||
|
"formatter": [
|
||||||
|
{
|
||||||
|
"external": {
|
||||||
|
"command": "djlint",
|
||||||
|
"arguments": [
|
||||||
|
"--reformat",
|
||||||
|
"--format-css",
|
||||||
|
"--format-js",
|
||||||
|
"-"
|
||||||
|
// "{buffer_path}"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"format_on_save": "on"
|
||||||
|
},
|
||||||
|
"Python": {
|
||||||
|
"format_on_save": "language_server",
|
||||||
|
"formatter": [
|
||||||
|
{
|
||||||
|
"language_server": {
|
||||||
|
"name": "ruff"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"language_servers": ["pyright", "ruff"]
|
||||||
|
},
|
||||||
|
"Rust": {
|
||||||
|
"format_on_save": "language_server",
|
||||||
|
"formatter": "language_server"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
// Static tasks configuration.
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"label": "lazygit",
|
||||||
|
"command": "lazygit -p $ZED_WORKTREE_ROOT",
|
||||||
|
"use_new_terminal": true,
|
||||||
|
"reveal": "always",
|
||||||
|
"reveal_target": "center",
|
||||||
|
"hide": "always",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "btop",
|
||||||
|
"command": "btop",
|
||||||
|
"use_new_terminal": true,
|
||||||
|
"reveal": "always",
|
||||||
|
"reveal_target": "center",
|
||||||
|
"hide": "always",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Example task",
|
||||||
|
"command": "for i in {1..5}; do echo \"Hello $i/5\"; sleep 1; done",
|
||||||
|
//"args": [],
|
||||||
|
// Env overrides for the command, will be appended to the terminal's environment from the settings.
|
||||||
|
"env": {
|
||||||
|
"foo": "bar"
|
||||||
|
},
|
||||||
|
// Current working directory to spawn the command into, defaults to current project root.
|
||||||
|
//"cwd": "/path/to/working/directory",
|
||||||
|
// Whether to use a new terminal tab or reuse the existing one to spawn the process, defaults to `false`.
|
||||||
|
"use_new_terminal": false,
|
||||||
|
// Whether to allow multiple instances of the same task to be run, or rather wait for the existing ones to finish, defaults to `false`.
|
||||||
|
"allow_concurrent_runs": false,
|
||||||
|
// What to do with the terminal pane and tab, after the command was started:
|
||||||
|
// * `always` — always show the task's pane, and focus the corresponding tab in it (default)
|
||||||
|
// * `no_focus` — always show the task's pane, add the task's tab in it, but don't focus it
|
||||||
|
// * `never` — do not alter focus, but still add/reuse the task's tab in its pane
|
||||||
|
"reveal": "always",
|
||||||
|
// Where to place the task's terminal item after starting the task:
|
||||||
|
// * `dock` — in the terminal dock, "regular" terminal items' place (default)
|
||||||
|
// * `center` — in the central pane group, "main" editor area
|
||||||
|
"reveal_target": "dock",
|
||||||
|
// What to do with the terminal pane and tab, after the command had finished:
|
||||||
|
// * `never` — Do nothing when the command finishes (default)
|
||||||
|
// * `always` — always hide the terminal tab, hide the pane also if it was the last tab in it
|
||||||
|
// * `on_success` — hide the terminal tab on task success only, otherwise behaves similar to `always`
|
||||||
|
"hide": "never",
|
||||||
|
// Which shell to use when running a task inside the terminal.
|
||||||
|
// May take 3 values:
|
||||||
|
// 1. (default) Use the system's default terminal configuration in /etc/passwd
|
||||||
|
// "shell": "system"
|
||||||
|
// 2. A program:
|
||||||
|
// "shell": {
|
||||||
|
// "program": "sh"
|
||||||
|
// }
|
||||||
|
// 3. A program with arguments:
|
||||||
|
// "shell": {
|
||||||
|
// "with_arguments": {
|
||||||
|
// "program": "/bin/bash",
|
||||||
|
// "args": ["--login"]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
"shell": "system"
|
||||||
|
}
|
||||||
|
]
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 7c63964eb68b102e8b6f69d176120fad26f12baa
|
|
10
.gitconfig
10
.gitconfig
|
@ -1,10 +0,0 @@
|
||||||
[user]
|
|
||||||
email = software@cscherr.de
|
|
||||||
name = PlexSheep
|
|
||||||
signingkey = software@cscherr.de
|
|
||||||
[credential]
|
|
||||||
helper = store --file ~/.git-credentials
|
|
||||||
[commit]
|
|
||||||
gpgsign = true
|
|
||||||
[pull]
|
|
||||||
rebase = false
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# check for WIP commits
|
||||||
|
wips=$(git log --oneline --no-decorate | grep -i wip )
|
||||||
|
wips_n=$(echo "$wips" | wc -l)
|
||||||
|
LOCKFILE="$PWD/.git/.githook.allow_wip"
|
||||||
|
|
||||||
|
# This checks if neither lockfile exists AND wips is non-empty
|
||||||
|
if [[ ! -f $LOCKFILE && -n "$wips" ]]; then
|
||||||
|
# Allows us to read user input below, assigns stdin to keyboard
|
||||||
|
exec < /dev/tty
|
||||||
|
echo "contains $wips_n WIP commit(s)"
|
||||||
|
read -p "Really push? (Y/N) " -n 1 -r
|
||||||
|
case "$REPLY" in
|
||||||
|
y|Y ) echo -e "\ncontinuing..."; touch $LOCKFILE;;
|
||||||
|
* ) echo -e "\naborting."; exit 1;;
|
||||||
|
esac
|
||||||
|
fi
|
|
@ -3,8 +3,11 @@
|
||||||
|
|
||||||
# except:
|
# except:
|
||||||
!.zshrc
|
!.zshrc
|
||||||
|
!.zprofile
|
||||||
!.vimrc
|
!.vimrc
|
||||||
!.ideavimrc
|
!.ideavimrc
|
||||||
|
!.githooks
|
||||||
|
!.githooks/**
|
||||||
!.config
|
!.config
|
||||||
!.config/nvim
|
!.config/nvim
|
||||||
!.config/nvim/**
|
!.config/nvim/**
|
||||||
|
@ -12,13 +15,28 @@
|
||||||
!.config/btop/**
|
!.config/btop/**
|
||||||
!.config/kitty
|
!.config/kitty
|
||||||
!.config/kitty/**
|
!.config/kitty/**
|
||||||
|
!.config/zed
|
||||||
|
!.config/zed/**
|
||||||
|
!.githooks
|
||||||
|
!.githooks/**
|
||||||
|
!.config/rustfmt/**
|
||||||
|
!.config/rustfmt/
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!.zsh
|
!.zsh
|
||||||
!.zsh/**
|
!.zsh/**
|
||||||
!.tmux.conf
|
!.tmux.conf
|
||||||
!.gitconfig
|
|
||||||
!.local/fzf
|
!.local/fzf
|
||||||
!.local/fzf/**
|
!.local/fzf/**
|
||||||
!.local/nvim
|
!.local/nvim
|
||||||
!.local/nvim/**
|
!.local/nvim/**
|
||||||
|
!.local/share/nvim
|
||||||
|
!.local/share/nvim/**
|
||||||
|
!.terminfo
|
||||||
|
!.terminfo/**
|
||||||
|
!.config/shortkuts.kksrc
|
||||||
|
!.config/user-dirs.dirs
|
||||||
|
!Documents/install_it_all.sh
|
||||||
|
|
||||||
|
# except except
|
||||||
|
.config/btop/btop.log
|
||||||
.config/btop/btop.log
|
.config/btop/btop.log
|
||||||
|
|
|
@ -4,3 +4,6 @@
|
||||||
[submodule "nvchad-custom"]
|
[submodule "nvchad-custom"]
|
||||||
path = .custon/nvim/lua/custom
|
path = .custon/nvim/lua/custom
|
||||||
url = https://git.cscherr.de/PlexSheep/nvchad-custom
|
url = https://git.cscherr.de/PlexSheep/nvchad-custom
|
||||||
|
[submodule ".zsh/plugins/zsh-autoquoter"]
|
||||||
|
path = .zsh/plugins/zsh-autoquoter
|
||||||
|
url = https://github.com/ianthehenry/zsh-autoquoter
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,269 @@
|
||||||
|
xterm-kitty|KovIdTTY,
|
||||||
|
Su,
|
||||||
|
Tc,
|
||||||
|
XF,
|
||||||
|
am,
|
||||||
|
ccc,
|
||||||
|
fullkbd,
|
||||||
|
hs,
|
||||||
|
km,
|
||||||
|
mc5i,
|
||||||
|
mir,
|
||||||
|
msgr,
|
||||||
|
npc,
|
||||||
|
xenl,
|
||||||
|
colors#256,
|
||||||
|
cols#80,
|
||||||
|
it#8,
|
||||||
|
lines#24,
|
||||||
|
pairs#32767,
|
||||||
|
BD=\E[?2004l,
|
||||||
|
BE=\E[?2004h,
|
||||||
|
Cr=\E]112\007,
|
||||||
|
Cs=\E]12;%p1%s\007,
|
||||||
|
Ms=\E]52;%p1%s;%p2%s\E\\,
|
||||||
|
PE=\E[201~,
|
||||||
|
PS=\E[200~,
|
||||||
|
RV=\E[>c,
|
||||||
|
Se=\E[2\sq,
|
||||||
|
Setulc=\E[58:2:%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d%;m,
|
||||||
|
Smulx=\E[4:%p1%dm,
|
||||||
|
Ss=\E[%p1%d\sq,
|
||||||
|
Sync=\EP=%p1%ds\E\\,
|
||||||
|
XR=\E[>0q,
|
||||||
|
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
||||||
|
bel=^G,
|
||||||
|
bold=\E[1m,
|
||||||
|
cbt=\E[Z,
|
||||||
|
civis=\E[?25l,
|
||||||
|
clear=\E[H\E[2J,
|
||||||
|
cnorm=\E[?12h\E[?25h,
|
||||||
|
cr=^M,
|
||||||
|
csr=\E[%i%p1%d;%p2%dr,
|
||||||
|
cub=\E[%p1%dD,
|
||||||
|
cub1=^H,
|
||||||
|
cud=\E[%p1%dB,
|
||||||
|
cud1=^J,
|
||||||
|
cuf=\E[%p1%dC,
|
||||||
|
cuf1=\E[C,
|
||||||
|
cup=\E[%i%p1%d;%p2%dH,
|
||||||
|
cuu=\E[%p1%dA,
|
||||||
|
cuu1=\E[A,
|
||||||
|
cvvis=\E[?12;25h,
|
||||||
|
dch=\E[%p1%dP,
|
||||||
|
dch1=\E[P,
|
||||||
|
dim=\E[2m,
|
||||||
|
dl=\E[%p1%dM,
|
||||||
|
dl1=\E[M,
|
||||||
|
dsl=\E]2;\E\\,
|
||||||
|
ech=\E[%p1%dX,
|
||||||
|
ed=\E[J,
|
||||||
|
el=\E[K,
|
||||||
|
el1=\E[1K,
|
||||||
|
fd=\E[?1004l,
|
||||||
|
fe=\E[?1004h,
|
||||||
|
flash=\E[?5h$<100/>\E[?5l,
|
||||||
|
fsl=^G,
|
||||||
|
home=\E[H,
|
||||||
|
hpa=\E[%i%p1%dG,
|
||||||
|
ht=^I,
|
||||||
|
hts=\EH,
|
||||||
|
ich=\E[%p1%d@,
|
||||||
|
il=\E[%p1%dL,
|
||||||
|
il1=\E[L,
|
||||||
|
ind=^J,
|
||||||
|
indn=\E[%p1%dS,
|
||||||
|
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
|
||||||
|
kBEG=\E[1;2E,
|
||||||
|
kBEG3=\E[1;3E,
|
||||||
|
kBEG4=\E[1;4E,
|
||||||
|
kBEG5=\E[1;5E,
|
||||||
|
kBEG6=\E[1;6E,
|
||||||
|
kBEG7=\E[1;7E,
|
||||||
|
kDC=\E[3;2~,
|
||||||
|
kDC3=\E[3;3~,
|
||||||
|
kDC4=\E[3;4~,
|
||||||
|
kDC5=\E[3;5~,
|
||||||
|
kDC6=\E[3;6~,
|
||||||
|
kDC7=\E[3;7~,
|
||||||
|
kDN=\E[1;2B,
|
||||||
|
kDN3=\E[1;3B,
|
||||||
|
kDN4=\E[1;4B,
|
||||||
|
kDN5=\E[1;5B,
|
||||||
|
kDN6=\E[1;6B,
|
||||||
|
kDN7=\E[1;7B,
|
||||||
|
kEND=\E[1;2F,
|
||||||
|
kEND3=\E[1;3F,
|
||||||
|
kEND4=\E[1;4F,
|
||||||
|
kEND5=\E[1;5F,
|
||||||
|
kEND6=\E[1;6F,
|
||||||
|
kEND7=\E[1;7F,
|
||||||
|
kHOM=\E[1;2H,
|
||||||
|
kHOM3=\E[1;3H,
|
||||||
|
kHOM4=\E[1;4H,
|
||||||
|
kHOM5=\E[1;5H,
|
||||||
|
kHOM6=\E[1;6H,
|
||||||
|
kHOM7=\E[1;7H,
|
||||||
|
kIC=\E[2;2~,
|
||||||
|
kIC3=\E[2;3~,
|
||||||
|
kIC4=\E[2;4~,
|
||||||
|
kIC5=\E[2;5~,
|
||||||
|
kIC6=\E[2;6~,
|
||||||
|
kIC7=\E[2;7~,
|
||||||
|
kLFT=\E[1;2D,
|
||||||
|
kLFT3=\E[1;3D,
|
||||||
|
kLFT4=\E[1;4D,
|
||||||
|
kLFT5=\E[1;5D,
|
||||||
|
kLFT6=\E[1;6D,
|
||||||
|
kLFT7=\E[1;7D,
|
||||||
|
kNXT=\E[6;2~,
|
||||||
|
kNXT3=\E[6;3~,
|
||||||
|
kNXT4=\E[6;4~,
|
||||||
|
kNXT5=\E[6;5~,
|
||||||
|
kNXT6=\E[6;6~,
|
||||||
|
kNXT7=\E[6;7~,
|
||||||
|
kPRV=\E[5;2~,
|
||||||
|
kPRV3=\E[5;3~,
|
||||||
|
kPRV4=\E[5;4~,
|
||||||
|
kPRV5=\E[5;5~,
|
||||||
|
kPRV6=\E[5;6~,
|
||||||
|
kPRV7=\E[5;7~,
|
||||||
|
kRIT=\E[1;2C,
|
||||||
|
kRIT3=\E[1;3C,
|
||||||
|
kRIT4=\E[1;4C,
|
||||||
|
kRIT5=\E[1;5C,
|
||||||
|
kRIT6=\E[1;6C,
|
||||||
|
kRIT7=\E[1;7C,
|
||||||
|
kUP=\E[1;2A,
|
||||||
|
kUP3=\E[1;3A,
|
||||||
|
kUP4=\E[1;4A,
|
||||||
|
kUP5=\E[1;5A,
|
||||||
|
kUP6=\E[1;6A,
|
||||||
|
kUP7=\E[1;7A,
|
||||||
|
ka1=,
|
||||||
|
ka3=,
|
||||||
|
kbeg=\EOE,
|
||||||
|
kbs=\177,
|
||||||
|
kc1=,
|
||||||
|
kc3=,
|
||||||
|
kcbt=\E[Z,
|
||||||
|
kcub1=\EOD,
|
||||||
|
kcud1=\EOB,
|
||||||
|
kcuf1=\EOC,
|
||||||
|
kcuu1=\EOA,
|
||||||
|
kdch1=\E[3~,
|
||||||
|
kend=\EOF,
|
||||||
|
kf1=\EOP,
|
||||||
|
kf10=\E[21~,
|
||||||
|
kf11=\E[23~,
|
||||||
|
kf12=\E[24~,
|
||||||
|
kf13=\E[1;2P,
|
||||||
|
kf14=\E[1;2Q,
|
||||||
|
kf15=\E[13;2~,
|
||||||
|
kf16=\E[1;2S,
|
||||||
|
kf17=\E[15;2~,
|
||||||
|
kf18=\E[17;2~,
|
||||||
|
kf19=\E[18;2~,
|
||||||
|
kf2=\EOQ,
|
||||||
|
kf20=\E[19;2~,
|
||||||
|
kf21=\E[20;2~,
|
||||||
|
kf22=\E[21;2~,
|
||||||
|
kf23=\E[23;2~,
|
||||||
|
kf24=\E[24;2~,
|
||||||
|
kf25=\E[1;5P,
|
||||||
|
kf26=\E[1;5Q,
|
||||||
|
kf27=\E[13;5~,
|
||||||
|
kf28=\E[1;5S,
|
||||||
|
kf29=\E[15;5~,
|
||||||
|
kf3=\EOR,
|
||||||
|
kf30=\E[17;5~,
|
||||||
|
kf31=\E[18;5~,
|
||||||
|
kf32=\E[19;5~,
|
||||||
|
kf33=\E[20;5~,
|
||||||
|
kf34=\E[21;5~,
|
||||||
|
kf35=\E[23;5~,
|
||||||
|
kf36=\E[24;5~,
|
||||||
|
kf37=\E[1;6P,
|
||||||
|
kf38=\E[1;6Q,
|
||||||
|
kf39=\E[13;6~,
|
||||||
|
kf4=\EOS,
|
||||||
|
kf40=\E[1;6S,
|
||||||
|
kf41=\E[15;6~,
|
||||||
|
kf42=\E[17;6~,
|
||||||
|
kf43=\E[18;6~,
|
||||||
|
kf44=\E[19;6~,
|
||||||
|
kf45=\E[20;6~,
|
||||||
|
kf46=\E[21;6~,
|
||||||
|
kf47=\E[23;6~,
|
||||||
|
kf48=\E[24;6~,
|
||||||
|
kf49=\E[1;3P,
|
||||||
|
kf5=\E[15~,
|
||||||
|
kf50=\E[1;3Q,
|
||||||
|
kf51=\E[13;3~,
|
||||||
|
kf52=\E[1;3S,
|
||||||
|
kf53=\E[15;3~,
|
||||||
|
kf54=\E[17;3~,
|
||||||
|
kf55=\E[18;3~,
|
||||||
|
kf56=\E[19;3~,
|
||||||
|
kf57=\E[20;3~,
|
||||||
|
kf58=\E[21;3~,
|
||||||
|
kf59=\E[23;3~,
|
||||||
|
kf6=\E[17~,
|
||||||
|
kf60=\E[24;3~,
|
||||||
|
kf61=\E[1;4P,
|
||||||
|
kf62=\E[1;4Q,
|
||||||
|
kf63=\E[13;4~,
|
||||||
|
kf7=\E[18~,
|
||||||
|
kf8=\E[19~,
|
||||||
|
kf9=\E[20~,
|
||||||
|
khlp=,
|
||||||
|
khome=\EOH,
|
||||||
|
kich1=\E[2~,
|
||||||
|
kind=\E[1;2B,
|
||||||
|
kmous=\E[M,
|
||||||
|
knp=\E[6~,
|
||||||
|
kpp=\E[5~,
|
||||||
|
kri=\E[1;2A,
|
||||||
|
kund=,
|
||||||
|
kxIN=\E[I,
|
||||||
|
kxOUT=\E[O,
|
||||||
|
oc=\E]104\007,
|
||||||
|
op=\E[39;49m,
|
||||||
|
rc=\E8,
|
||||||
|
rep=%p1%c\E[%p2%{1}%-%db,
|
||||||
|
rev=\E[7m,
|
||||||
|
ri=\EM,
|
||||||
|
rin=\E[%p1%dT,
|
||||||
|
ritm=\E[23m,
|
||||||
|
rmacs=\E(B,
|
||||||
|
rmam=\E[?7l,
|
||||||
|
rmcup=\E[?1049l,
|
||||||
|
rmir=\E[4l,
|
||||||
|
rmkx=\E[?1l,
|
||||||
|
rmso=\E[27m,
|
||||||
|
rmul=\E[24m,
|
||||||
|
rmxx=\E[29m,
|
||||||
|
rs1=\E]\E\\\Ec,
|
||||||
|
sc=\E7,
|
||||||
|
setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
|
||||||
|
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
|
||||||
|
setrgbb=\E[48:2:%p1%d:%p2%d:%p3%dm,
|
||||||
|
setrgbf=\E[38:2:%p1%d:%p2%d:%p3%dm,
|
||||||
|
sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
|
||||||
|
sgr0=\E(B\E[m,
|
||||||
|
sitm=\E[3m,
|
||||||
|
smacs=\E(0,
|
||||||
|
smam=\E[?7h,
|
||||||
|
smcup=\E[?1049h,
|
||||||
|
smir=\E[4h,
|
||||||
|
smkx=\E[?1h,
|
||||||
|
smso=\E[7m,
|
||||||
|
smul=\E[4m,
|
||||||
|
smxx=\E[9m,
|
||||||
|
tbc=\E[3g,
|
||||||
|
tsl=\E]2;,
|
||||||
|
u6=\E[%i%d;%dR,
|
||||||
|
u7=\E[6n,
|
||||||
|
u8=\E[?%[;0123456789]c,
|
||||||
|
u9=\E[c,
|
||||||
|
vpa=\E[%i%p1%dd,
|
Binary file not shown.
10
.tmux.conf
10
.tmux.conf
|
@ -1,8 +1,12 @@
|
||||||
# thanks to this awesome guide: https://thevaluable.dev/tmux-config-mouseless/ (visited 2023-02-04
|
# thanks to this awesome guide: https://thevaluable.dev/tmux-config-mouseless/ (visited 2023-02-04
|
||||||
|
|
||||||
# make ctrl-space the prefix. Keep ctrl-b as an alternative.
|
# make ctrl-space the prefix. Unbind default ctrl-b
|
||||||
#unbind C-b
|
set -g prefix C-Space
|
||||||
set -g prefix2 C-Space
|
set -g prefix C-Space
|
||||||
|
unbind -T prefix C-b
|
||||||
|
unbind -n C-b
|
||||||
|
unbind C-b
|
||||||
|
bind-key -n C-b send-keys C-b
|
||||||
|
|
||||||
# enable using the mouse
|
# enable using the mouse
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
|
|
11
.vimrc
11
.vimrc
|
@ -1,4 +1,5 @@
|
||||||
" GENERAL CONFIGS ----------------------------------------------------------------------------------
|
" GENERAL CONFIGS ----------------------------------------------------------------------------------
|
||||||
|
colorscheme slate " use a less ugly colorscheme
|
||||||
syntax on " syntax highlighting
|
syntax on " syntax highlighting
|
||||||
set nocompatible " disable compatibility to old-time vi
|
set nocompatible " disable compatibility to old-time vi
|
||||||
set number
|
set number
|
||||||
|
@ -23,6 +24,7 @@ set numberwidth=4 " How much space the line numbers should take
|
||||||
set signcolumn=yes " Show extra icons in the line numbers (like git marks, errors)
|
set signcolumn=yes " Show extra icons in the line numbers (like git marks, errors)
|
||||||
set timeout timeoutlen=400 " How long to wait for non prefix free hotkey melodies
|
set timeout timeoutlen=400 " How long to wait for non prefix free hotkey melodies
|
||||||
set ttimeoutlen=0
|
set ttimeoutlen=0
|
||||||
|
set nowrap
|
||||||
|
|
||||||
" Avoid showing message extra message when using completion
|
" Avoid showing message extra message when using completion
|
||||||
set shortmess+=c
|
set shortmess+=c
|
||||||
|
@ -127,3 +129,12 @@ nnoremap zN [s
|
||||||
" same as above but only with bad words (unrecognized)
|
" same as above but only with bad words (unrecognized)
|
||||||
nnoremap Zn ]S
|
nnoremap Zn ]S
|
||||||
nnoremap ZN [S
|
nnoremap ZN [S
|
||||||
|
|
||||||
|
" how to move in insert
|
||||||
|
vnoremap <leader>y "+y
|
||||||
|
nnoremap <leader>Y "+Y
|
||||||
|
nnoremap <leader>y "+y
|
||||||
|
nnoremap <leader>yy "+yy
|
||||||
|
|
||||||
|
" back to normal mode with jk in insert
|
||||||
|
imap jk <esc>
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
export GEM_HOME="$HOME/.local/share/gems"
|
||||||
|
export PATH="/usr/bin:/usr/sbin:$HOME/.local/bin:$HOME/.cargo/bin:/usr/local/bin:$HOME/.deno/bin:/usr/games/:$GEM_HOME/bin"
|
||||||
|
export EDITOR=nvim
|
||||||
|
export editor=nvim
|
||||||
|
export XDG_CONFIG_HOME=~/.config
|
||||||
|
|
||||||
|
export GTK_IM_MODULE=ibus
|
||||||
|
export QT_IM_MODULE=ibus
|
||||||
|
export SDL_IM_MODULE=ibus
|
||||||
|
export GLFW_IM_MODULE=ibus
|
||||||
|
export XMODIFIERS=@im=ibus
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 9e3b1b216bf7b61a9807a242bae730b5fc232a44
|
|
@ -0,0 +1,7 @@
|
||||||
|
#compdef nala
|
||||||
|
|
||||||
|
_nala_completion() {
|
||||||
|
eval $(env _TYPER_COMPLETE_ARGS="${words[1,$CURRENT]}" _NALA_COMPLETE=complete_zsh nala)
|
||||||
|
}
|
||||||
|
|
||||||
|
compdef _nala_completion nala
|
|
@ -0,0 +1,786 @@
|
||||||
|
#compdef rustup
|
||||||
|
|
||||||
|
autoload -U is-at-least
|
||||||
|
|
||||||
|
_rustup() {
|
||||||
|
typeset -A opt_args
|
||||||
|
typeset -a _arguments_options
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
if is-at-least 5.2; then
|
||||||
|
_arguments_options=(-s -S -C)
|
||||||
|
else
|
||||||
|
_arguments_options=(-s -C)
|
||||||
|
fi
|
||||||
|
|
||||||
|
local context curcontext="$curcontext" state line
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'-V[Print version information]' \
|
||||||
|
'--version[Print version information]' \
|
||||||
|
'*-v[Enable verbose output]' \
|
||||||
|
'*--verbose[Enable verbose output]' \
|
||||||
|
'(-v --verbose)*-q[Disable progress output]' \
|
||||||
|
'(-v --verbose)*--quiet[Disable progress output]' \
|
||||||
|
'::+toolchain -- release channel (e.g. +stable) or custom toolchain to set override:' \
|
||||||
|
":: :_rustup_commands" \
|
||||||
|
"*::: :->rustup" \
|
||||||
|
&& ret=0
|
||||||
|
case $state in
|
||||||
|
(rustup)
|
||||||
|
words=($line[2] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:rustup-command-$line[2]:"
|
||||||
|
case $line[2] in
|
||||||
|
(dump-testament)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(show)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*-v[Enable verbose output with rustc information for all installed toolchains]' \
|
||||||
|
'*--verbose[Enable verbose output with rustc information for all installed toolchains]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
":: :_rustup__show_commands" \
|
||||||
|
"*::: :->show" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(show)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:rustup-show-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(active-toolchain)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*-v[Enable verbose output with rustc information]' \
|
||||||
|
'*--verbose[Enable verbose output with rustc information]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(home)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(profile)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(install)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--profile=[]: :(minimal default complete)' \
|
||||||
|
'*--no-self-update[Don'\''t perform self-update when running the `rustup install` command]' \
|
||||||
|
'*--force[Force an update, even if some components are missing]' \
|
||||||
|
'*--force-non-host[Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(uninstall)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(update)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*--no-self-update[Don'\''t perform self update when running the `rustup update` command]' \
|
||||||
|
'*--force[Force an update, even if some components are missing]' \
|
||||||
|
'*--force-non-host[Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(check)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(default)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(toolchain)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
":: :_rustup__toolchain_commands" \
|
||||||
|
"*::: :->toolchain" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(toolchain)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:rustup-toolchain-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(list)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*-v[Enable verbose output with toolchain information]' \
|
||||||
|
'*--verbose[Enable verbose output with toolchain information]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(install)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--profile=[]: :(minimal default complete)' \
|
||||||
|
'*-c+[Add specific components on installation]: : ' \
|
||||||
|
'*--component=[Add specific components on installation]: : ' \
|
||||||
|
'*-t+[Add specific targets on installation]: : ' \
|
||||||
|
'*--target=[Add specific targets on installation]: : ' \
|
||||||
|
'*--no-self-update[Don'\''t perform self update when running the`rustup toolchain install` command]' \
|
||||||
|
'*--force[Force an update, even if some components are missing]' \
|
||||||
|
'*--allow-downgrade[Allow rustup to downgrade the toolchain to satisfy your component choice]' \
|
||||||
|
'*--force-non-host[Install toolchains that require an emulator. See https://github.com/rust-lang/rustup/wiki/Non-host-toolchains]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(uninstall)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'*::toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(link)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':toolchain -- Custom toolchain name:' \
|
||||||
|
':path -- Path to the directory:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(target)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
":: :_rustup__target_commands" \
|
||||||
|
"*::: :->target" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(target)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:rustup-target-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(list)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \
|
||||||
|
'*--installed[List only installed targets]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(add)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'*::target -- List of targets to install; "all" installs all available targets:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(remove)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'*::target -- List of targets to uninstall:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(component)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
":: :_rustup__component_commands" \
|
||||||
|
"*::: :->component" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(component)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:rustup-component-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(list)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \
|
||||||
|
'*--installed[List only installed components]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(add)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \
|
||||||
|
'--target=[]: : ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'*::component:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(remove)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \
|
||||||
|
'--target=[]: : ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'*::component:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(override)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
":: :_rustup__override_commands" \
|
||||||
|
"*::: :->override" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(override)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:rustup-override-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(list)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(set)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--path=[Path to the directory]: : ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(unset)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--path=[Path to the directory]: : ' \
|
||||||
|
'*--nonexistent[Remove override toolchain for all nonexistent directories]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(run)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*--install[Install the requested toolchain if needed]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':toolchain -- Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`:' \
|
||||||
|
'*::command:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(which)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':command:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(doc)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \
|
||||||
|
'*--path[Only print the path to the documentation]' \
|
||||||
|
'*--alloc[The Rust core allocation and collections library]' \
|
||||||
|
'*--book[The Rust Programming Language book]' \
|
||||||
|
'*--cargo[The Cargo Book]' \
|
||||||
|
'*--core[The Rust Core Library]' \
|
||||||
|
'*--edition-guide[The Rust Edition Guide]' \
|
||||||
|
'*--nomicon[The Dark Arts of Advanced and Unsafe Rust Programming]' \
|
||||||
|
'*--proc_macro[A support library for macro authors when defining new macros]' \
|
||||||
|
'*--reference[The Rust Reference]' \
|
||||||
|
'*--rust-by-example[A collection of runnable examples that illustrate various Rust concepts and standard libraries]' \
|
||||||
|
'*--rustc[The compiler for the Rust programming language]' \
|
||||||
|
'*--rustdoc[Documentation generator for Rust projects]' \
|
||||||
|
'*--std[Standard library API documentation]' \
|
||||||
|
'*--test[Support code for rustc'\''s built in unit-test and micro-benchmarking framework]' \
|
||||||
|
'*--unstable-book[The Unstable Book]' \
|
||||||
|
'*--embedded-book[The Embedded Rust Book]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'::topic -- Topic such as '\''core'\'', '\''fn'\'', '\''usize'\'', '\''eprintln!'\'', '\''core\:\:arch'\'', '\''alloc\:\:format!'\'', '\''std\:\:fs'\'', '\''std\:\:fs\:\:read_dir'\'', '\''std\:\:io\:\:Bytes'\'', '\''std\:\:iter\:\:Sum'\'', '\''std\:\:io\:\:error\:\:Result'\'' etc...:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(man)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'--toolchain=[Toolchain name, such as '\''stable'\'', '\''nightly'\'', or '\''1.8.0'\''. For more information see `rustup help toolchain`]: : ' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':command:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(self)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
":: :_rustup__self_commands" \
|
||||||
|
"*::: :->self" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(self)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:rustup-self-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(update)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(uninstall)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*-y[]' \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(upgrade-data)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(set)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
":: :_rustup__set_commands" \
|
||||||
|
"*::: :->set" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(set)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:rustup-set-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(default-host)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':host_triple:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(profile)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':profile-name:(minimal default complete)' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(auto-self-update)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
':auto-self-update-mode:(enable disable check-only)' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(completions)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'-h[Print help information]' \
|
||||||
|
'--help[Print help information]' \
|
||||||
|
'::shell:(bash elvish fish powershell zsh)' \
|
||||||
|
'::command:(rustup cargo)' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" \
|
||||||
|
'*::subcommand -- The subcommand whose help message to display:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_rustup_commands] )) ||
|
||||||
|
_rustup_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'dump-testament:Dump information about the build' \
|
||||||
|
'show:Show the active and installed toolchains or profiles' \
|
||||||
|
'install:Update Rust toolchains' \
|
||||||
|
'uninstall:Uninstall Rust toolchains' \
|
||||||
|
'update:Update Rust toolchains and rustup' \
|
||||||
|
'check:Check for updates to Rust toolchains and rustup' \
|
||||||
|
'default:Set the default toolchain' \
|
||||||
|
'toolchain:Modify or query the installed toolchains' \
|
||||||
|
'target:Modify a toolchain'\''s supported targets' \
|
||||||
|
'component:Modify a toolchain'\''s installed components' \
|
||||||
|
'override:Modify directory toolchain overrides' \
|
||||||
|
'run:Run a command with an environment configured for a given toolchain' \
|
||||||
|
'which:Display which binary will be run for a given command' \
|
||||||
|
'doc:Open the documentation for the current toolchain' \
|
||||||
|
'man:View the man page for a given command' \
|
||||||
|
'self:Modify the rustup installation' \
|
||||||
|
'set:Alter rustup settings' \
|
||||||
|
'completions:Generate tab-completion scripts for your shell' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'rustup commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__show__active-toolchain_commands] )) ||
|
||||||
|
_rustup__show__active-toolchain_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup show active-toolchain commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__component__add_commands] )) ||
|
||||||
|
_rustup__component__add_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup component add commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__target__add_commands] )) ||
|
||||||
|
_rustup__target__add_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup target add commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__set__auto-self-update_commands] )) ||
|
||||||
|
_rustup__set__auto-self-update_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup set auto-self-update commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__check_commands] )) ||
|
||||||
|
_rustup__check_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup check commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__completions_commands] )) ||
|
||||||
|
_rustup__completions_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup completions commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__component_commands] )) ||
|
||||||
|
_rustup__component_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'list:List installed and available components' \
|
||||||
|
'add:Add a component to a Rust toolchain' \
|
||||||
|
'remove:Remove a component from a Rust toolchain' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'rustup component commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__default_commands] )) ||
|
||||||
|
_rustup__default_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup default commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__set__default-host_commands] )) ||
|
||||||
|
_rustup__set__default-host_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup set default-host commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__doc_commands] )) ||
|
||||||
|
_rustup__doc_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup doc commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__dump-testament_commands] )) ||
|
||||||
|
_rustup__dump-testament_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup dump-testament commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__component__help_commands] )) ||
|
||||||
|
_rustup__component__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup component help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__help_commands] )) ||
|
||||||
|
_rustup__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__override__help_commands] )) ||
|
||||||
|
_rustup__override__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup override help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__self__help_commands] )) ||
|
||||||
|
_rustup__self__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup self help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__set__help_commands] )) ||
|
||||||
|
_rustup__set__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup set help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__show__help_commands] )) ||
|
||||||
|
_rustup__show__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup show help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__target__help_commands] )) ||
|
||||||
|
_rustup__target__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup target help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__toolchain__help_commands] )) ||
|
||||||
|
_rustup__toolchain__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup toolchain help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__show__home_commands] )) ||
|
||||||
|
_rustup__show__home_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup show home commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__install_commands] )) ||
|
||||||
|
_rustup__install_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup install commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__toolchain__install_commands] )) ||
|
||||||
|
_rustup__toolchain__install_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup toolchain install commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__toolchain__link_commands] )) ||
|
||||||
|
_rustup__toolchain__link_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup toolchain link commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__component__list_commands] )) ||
|
||||||
|
_rustup__component__list_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup component list commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__override__list_commands] )) ||
|
||||||
|
_rustup__override__list_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup override list commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__target__list_commands] )) ||
|
||||||
|
_rustup__target__list_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup target list commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__toolchain__list_commands] )) ||
|
||||||
|
_rustup__toolchain__list_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup toolchain list commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__man_commands] )) ||
|
||||||
|
_rustup__man_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup man commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__override_commands] )) ||
|
||||||
|
_rustup__override_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'list:List directory toolchain overrides' \
|
||||||
|
'set:Set the override toolchain for a directory' \
|
||||||
|
'unset:Remove the override toolchain for a directory' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'rustup override commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__set__profile_commands] )) ||
|
||||||
|
_rustup__set__profile_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup set profile commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__show__profile_commands] )) ||
|
||||||
|
_rustup__show__profile_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup show profile commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__component__remove_commands] )) ||
|
||||||
|
_rustup__component__remove_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup component remove commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__target__remove_commands] )) ||
|
||||||
|
_rustup__target__remove_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup target remove commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__run_commands] )) ||
|
||||||
|
_rustup__run_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup run commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__self_commands] )) ||
|
||||||
|
_rustup__self_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'update:Download and install updates to rustup' \
|
||||||
|
'uninstall:Uninstall rustup.' \
|
||||||
|
'upgrade-data:Upgrade the internal data format.' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'rustup self commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__override__set_commands] )) ||
|
||||||
|
_rustup__override__set_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup override set commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__set_commands] )) ||
|
||||||
|
_rustup__set_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'default-host:The triple used to identify toolchains when not specified' \
|
||||||
|
'profile:The default components installed' \
|
||||||
|
'auto-self-update:The rustup auto self update mode' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'rustup set commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__show_commands] )) ||
|
||||||
|
_rustup__show_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'active-toolchain:Show the active toolchain' \
|
||||||
|
'home:Display the computed value of RUSTUP_HOME' \
|
||||||
|
'profile:Show the current profile' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'rustup show commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__target_commands] )) ||
|
||||||
|
_rustup__target_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'list:List installed and available targets' \
|
||||||
|
'add:Add a target to a Rust toolchain' \
|
||||||
|
'remove:Remove a target from a Rust toolchain' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'rustup target commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__toolchain_commands] )) ||
|
||||||
|
_rustup__toolchain_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'list:List installed toolchains' \
|
||||||
|
'install:Install or update a given toolchain' \
|
||||||
|
'uninstall:Uninstall a toolchain' \
|
||||||
|
'link:Create a custom toolchain by symlinking to a directory' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'rustup toolchain commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__self__uninstall_commands] )) ||
|
||||||
|
_rustup__self__uninstall_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup self uninstall commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__toolchain__uninstall_commands] )) ||
|
||||||
|
_rustup__toolchain__uninstall_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup toolchain uninstall commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__uninstall_commands] )) ||
|
||||||
|
_rustup__uninstall_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup uninstall commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__override__unset_commands] )) ||
|
||||||
|
_rustup__override__unset_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup override unset commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__self__update_commands] )) ||
|
||||||
|
_rustup__self__update_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup self update commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__update_commands] )) ||
|
||||||
|
_rustup__update_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup update commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__self__upgrade-data_commands] )) ||
|
||||||
|
_rustup__self__upgrade-data_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup self upgrade-data commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_rustup__which_commands] )) ||
|
||||||
|
_rustup__which_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'rustup which commands' commands "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
_rustup "$@"
|
|
@ -0,0 +1,692 @@
|
||||||
|
#compdef diesel
|
||||||
|
|
||||||
|
autoload -U is-at-least
|
||||||
|
|
||||||
|
_diesel() {
|
||||||
|
typeset -A opt_args
|
||||||
|
typeset -a _arguments_options
|
||||||
|
local ret=1
|
||||||
|
|
||||||
|
if is-at-least 5.2; then
|
||||||
|
_arguments_options=(-s -S -C)
|
||||||
|
else
|
||||||
|
_arguments_options=(-s -C)
|
||||||
|
fi
|
||||||
|
|
||||||
|
local context curcontext="$curcontext" state line
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'-V[Print version]' \
|
||||||
|
'--version[Print version]' \
|
||||||
|
":: :_diesel_commands" \
|
||||||
|
"*::: :->diesel" \
|
||||||
|
&& ret=0
|
||||||
|
case $state in
|
||||||
|
(diesel)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:diesel-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(migration)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
":: :_diesel__migration_commands" \
|
||||||
|
"*::: :->migration" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(migration)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:diesel-migration-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(run)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(revert)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'(-a --all)-n+[Reverts the last \`n\` migration files.]: : ' \
|
||||||
|
'(-a --all)--number=[Reverts the last \`n\` migration files.]: : ' \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'(-n --number)-a[Reverts previously run migration files.]' \
|
||||||
|
'(-n --number)--all[Reverts previously run migration files.]' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(redo)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'(-a --all)-n+[Redo the last \`n\` migration files.]: : ' \
|
||||||
|
'(-a --all)--number=[Redo the last \`n\` migration files.]: : ' \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'(-n --number)-a[Reverts and re-runs all migrations.]' \
|
||||||
|
'(-n --number)--all[Reverts and re-runs all migrations.]' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(list)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(pending)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(generate)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--version=[The version number to use when generating the migration. Defaults to the current timestamp, which should suffice for most use cases.]: : ' \
|
||||||
|
'--format=[The format of the migration to be generated.]: :(sql)' \
|
||||||
|
'--diff-schema=[Populate the generated migrations based on the current difference between your \`schema.rs\` file and the specified database. The generated migrations are not expected to be perfect. Be sure to check whether they meet your expectations. Adjust the generated output if that'\''s not the case.]' \
|
||||||
|
'*--schema-key=[select schema key from diesel.toml, use '\''default'\'' for print_schema without key.]: : ' \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'-u[Don'\''t generate a down.sql file. You won'\''t be able to run migration \`revert\` or \`redo\`.]' \
|
||||||
|
'--no-down[Don'\''t generate a down.sql file. You won'\''t be able to run migration \`revert\` or \`redo\`.]' \
|
||||||
|
'--sqlite-integer-primary-key-is-bigint[For SQLite 3.37 and above, detect \`INTEGER PRIMARY KEY\` columns as \`BigInt\`, when the table isn'\''t declared with \`WITHOUT ROWID\`. See https\://www.sqlite.org/lang_createtable.html#rowid for more information. Only used with the \`--diff-schema\` argument.]' \
|
||||||
|
'*-o[Only include tables from table-name that matches regexp.]' \
|
||||||
|
'*--only-tables[Only include tables from table-name that matches regexp.]' \
|
||||||
|
'*-e[Exclude tables from table-name that matches regex.]' \
|
||||||
|
'*--except-tables[Exclude tables from table-name that matches regex.]' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
':MIGRATION_NAME -- The name of the migration to create.:' \
|
||||||
|
'*::table-name -- Table names to filter.:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
":: :_diesel__migration__help_commands" \
|
||||||
|
"*::: :->help" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(help)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:diesel-migration-help-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(run)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(revert)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(redo)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(list)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(pending)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(generate)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(setup)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(database)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
":: :_diesel__database_commands" \
|
||||||
|
"*::: :->database" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(database)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:diesel-database-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(setup)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(reset)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(drop)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--migration-dir=[The location of your migration directory. By default this will look for a directory called \`migrations\` in the current directory and its parents.]: :_files' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
":: :_diesel__database__help_commands" \
|
||||||
|
"*::: :->help" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(help)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:diesel-database-help-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(setup)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(reset)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(drop)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(completions)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
':SHELL:(bash elvish fish powershell zsh)' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(print-schema)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
'-s+[The name of the schema.]: : ' \
|
||||||
|
'--schema=[The name of the schema.]: : ' \
|
||||||
|
'*--with-docs-config=[Render documentation comments for tables and columns.]: :(database-comments-fallback-to-auto-generated-doc-comment only-database-comments no-doc-comments)' \
|
||||||
|
'*--column-sorting=[Sort order for table columns.]: :(ordinal_position name)' \
|
||||||
|
'*--patch-file=[A unified diff file to be applied to the final schema.]: :_files' \
|
||||||
|
'*--import-types=[A list of types to import for every table, separated by commas.]: : ' \
|
||||||
|
'*--except-custom-type-definitions=[A list of regexes to filter the custom types definitions generated]: : ' \
|
||||||
|
'*--custom-type-derives=[A list of derives to implement for every automatically generated SqlType in the schema, separated by commas.]: : ' \
|
||||||
|
'*--schema-key=[select schema key from diesel.toml, use '\''default'\'' for print_schema without key.]: : ' \
|
||||||
|
'--database-url=[Specifies the database URL to connect to. Falls back to the DATABASE_URL environment variable if unspecified.]: : ' \
|
||||||
|
'--config-file=[The location of the configuration file to use. Falls back to the \`DIESEL_CONFIG_FILE\` environment variable if unspecified. Defaults to \`diesel.toml\` in your project root. See diesel.rs/guides/configuring-diesel-cli for documentation on this file.]: :_files' \
|
||||||
|
'*-o[Only include tables from table-name that matches regexp.]' \
|
||||||
|
'*--only-tables[Only include tables from table-name that matches regexp.]' \
|
||||||
|
'*-e[Exclude tables from table-name that matches regex.]' \
|
||||||
|
'*--except-tables[Exclude tables from table-name that matches regex.]' \
|
||||||
|
'*--with-docs[Render documentation comments for tables and columns.]' \
|
||||||
|
'*--no-generate-missing-sql-type-definitions[Generate SQL type definitions for types not provided by diesel]' \
|
||||||
|
'*--sqlite-integer-primary-key-is-bigint[For SQLite 3.37 and above, detect \`INTEGER PRIMARY KEY\` columns as \`BigInt\`, when the table isn'\''t declared with \`WITHOUT ROWID\`. See https\://www.sqlite.org/lang_createtable.html#rowid for more information.]' \
|
||||||
|
'--locked-schema[Require that the schema file is up to date.]' \
|
||||||
|
'-h[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'--help[Print help (see more with '\''--help'\'')]' \
|
||||||
|
'*::table-name -- Table names to filter.:' \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
":: :_diesel__help_commands" \
|
||||||
|
"*::: :->help" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(help)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:diesel-help-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(migration)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
":: :_diesel__help__migration_commands" \
|
||||||
|
"*::: :->migration" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(migration)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:diesel-help-migration-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(run)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(revert)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(redo)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(list)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(pending)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(generate)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(setup)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(database)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
":: :_diesel__help__database_commands" \
|
||||||
|
"*::: :->database" \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(database)
|
||||||
|
words=($line[1] "${words[@]}")
|
||||||
|
(( CURRENT += 1 ))
|
||||||
|
curcontext="${curcontext%:*:*}:diesel-help-database-command-$line[1]:"
|
||||||
|
case $line[1] in
|
||||||
|
(setup)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(reset)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(drop)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
(completions)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(print-schema)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
(help)
|
||||||
|
_arguments "${_arguments_options[@]}" : \
|
||||||
|
&& ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_diesel_commands] )) ||
|
||||||
|
_diesel_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'migration:A group of commands for generating, running, and reverting migrations.' \
|
||||||
|
'setup:Creates the migrations directory, creates the database specified in your DATABASE_URL, and runs existing migrations.' \
|
||||||
|
'database:A group of commands for setting up and resetting your database.' \
|
||||||
|
'completions:Generate shell completion scripts for the diesel command.' \
|
||||||
|
'print-schema:Print table definitions for database schema.' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'diesel commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__completions_commands] )) ||
|
||||||
|
_diesel__completions_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel completions commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__database_commands] )) ||
|
||||||
|
_diesel__database_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'setup:Creates the database specified in your DATABASE_URL, and then runs any existing migrations.' \
|
||||||
|
'reset:Resets your database by dropping the database specified in your DATABASE_URL and then running \`diesel database setup\`.' \
|
||||||
|
'drop:Drops the database specified in your DATABASE_URL.' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'diesel database commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__database__drop_commands] )) ||
|
||||||
|
_diesel__database__drop_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel database drop commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__database__help_commands] )) ||
|
||||||
|
_diesel__database__help_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'setup:Creates the database specified in your DATABASE_URL, and then runs any existing migrations.' \
|
||||||
|
'reset:Resets your database by dropping the database specified in your DATABASE_URL and then running \`diesel database setup\`.' \
|
||||||
|
'drop:Drops the database specified in your DATABASE_URL.' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'diesel database help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__database__help__drop_commands] )) ||
|
||||||
|
_diesel__database__help__drop_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel database help drop commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__database__help__help_commands] )) ||
|
||||||
|
_diesel__database__help__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel database help help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__database__help__reset_commands] )) ||
|
||||||
|
_diesel__database__help__reset_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel database help reset commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__database__help__setup_commands] )) ||
|
||||||
|
_diesel__database__help__setup_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel database help setup commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__database__reset_commands] )) ||
|
||||||
|
_diesel__database__reset_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel database reset commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__database__setup_commands] )) ||
|
||||||
|
_diesel__database__setup_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel database setup commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help_commands] )) ||
|
||||||
|
_diesel__help_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'migration:A group of commands for generating, running, and reverting migrations.' \
|
||||||
|
'setup:Creates the migrations directory, creates the database specified in your DATABASE_URL, and runs existing migrations.' \
|
||||||
|
'database:A group of commands for setting up and resetting your database.' \
|
||||||
|
'completions:Generate shell completion scripts for the diesel command.' \
|
||||||
|
'print-schema:Print table definitions for database schema.' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'diesel help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__completions_commands] )) ||
|
||||||
|
_diesel__help__completions_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help completions commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__database_commands] )) ||
|
||||||
|
_diesel__help__database_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'setup:Creates the database specified in your DATABASE_URL, and then runs any existing migrations.' \
|
||||||
|
'reset:Resets your database by dropping the database specified in your DATABASE_URL and then running \`diesel database setup\`.' \
|
||||||
|
'drop:Drops the database specified in your DATABASE_URL.' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'diesel help database commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__database__drop_commands] )) ||
|
||||||
|
_diesel__help__database__drop_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help database drop commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__database__reset_commands] )) ||
|
||||||
|
_diesel__help__database__reset_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help database reset commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__database__setup_commands] )) ||
|
||||||
|
_diesel__help__database__setup_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help database setup commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__help_commands] )) ||
|
||||||
|
_diesel__help__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__migration_commands] )) ||
|
||||||
|
_diesel__help__migration_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'run:Runs all pending migrations.' \
|
||||||
|
'revert:Reverts the specified migrations.' \
|
||||||
|
'redo:Reverts and re-runs the latest migration. Useful for testing that a migration can in fact be reverted.' \
|
||||||
|
'list:Lists all available migrations, marking those that have been applied.' \
|
||||||
|
'pending:Returns true if there are any pending migrations.' \
|
||||||
|
'generate:Generate a new migration with the given name, and the current timestamp as the version.' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'diesel help migration commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__migration__generate_commands] )) ||
|
||||||
|
_diesel__help__migration__generate_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help migration generate commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__migration__list_commands] )) ||
|
||||||
|
_diesel__help__migration__list_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help migration list commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__migration__pending_commands] )) ||
|
||||||
|
_diesel__help__migration__pending_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help migration pending commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__migration__redo_commands] )) ||
|
||||||
|
_diesel__help__migration__redo_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help migration redo commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__migration__revert_commands] )) ||
|
||||||
|
_diesel__help__migration__revert_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help migration revert commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__migration__run_commands] )) ||
|
||||||
|
_diesel__help__migration__run_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help migration run commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__print-schema_commands] )) ||
|
||||||
|
_diesel__help__print-schema_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help print-schema commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__help__setup_commands] )) ||
|
||||||
|
_diesel__help__setup_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel help setup commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration_commands] )) ||
|
||||||
|
_diesel__migration_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'run:Runs all pending migrations.' \
|
||||||
|
'revert:Reverts the specified migrations.' \
|
||||||
|
'redo:Reverts and re-runs the latest migration. Useful for testing that a migration can in fact be reverted.' \
|
||||||
|
'list:Lists all available migrations, marking those that have been applied.' \
|
||||||
|
'pending:Returns true if there are any pending migrations.' \
|
||||||
|
'generate:Generate a new migration with the given name, and the current timestamp as the version.' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'diesel migration commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__generate_commands] )) ||
|
||||||
|
_diesel__migration__generate_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration generate commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__help_commands] )) ||
|
||||||
|
_diesel__migration__help_commands() {
|
||||||
|
local commands; commands=(
|
||||||
|
'run:Runs all pending migrations.' \
|
||||||
|
'revert:Reverts the specified migrations.' \
|
||||||
|
'redo:Reverts and re-runs the latest migration. Useful for testing that a migration can in fact be reverted.' \
|
||||||
|
'list:Lists all available migrations, marking those that have been applied.' \
|
||||||
|
'pending:Returns true if there are any pending migrations.' \
|
||||||
|
'generate:Generate a new migration with the given name, and the current timestamp as the version.' \
|
||||||
|
'help:Print this message or the help of the given subcommand(s)' \
|
||||||
|
)
|
||||||
|
_describe -t commands 'diesel migration help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__help__generate_commands] )) ||
|
||||||
|
_diesel__migration__help__generate_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration help generate commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__help__help_commands] )) ||
|
||||||
|
_diesel__migration__help__help_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration help help commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__help__list_commands] )) ||
|
||||||
|
_diesel__migration__help__list_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration help list commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__help__pending_commands] )) ||
|
||||||
|
_diesel__migration__help__pending_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration help pending commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__help__redo_commands] )) ||
|
||||||
|
_diesel__migration__help__redo_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration help redo commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__help__revert_commands] )) ||
|
||||||
|
_diesel__migration__help__revert_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration help revert commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__help__run_commands] )) ||
|
||||||
|
_diesel__migration__help__run_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration help run commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__list_commands] )) ||
|
||||||
|
_diesel__migration__list_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration list commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__pending_commands] )) ||
|
||||||
|
_diesel__migration__pending_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration pending commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__redo_commands] )) ||
|
||||||
|
_diesel__migration__redo_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration redo commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__revert_commands] )) ||
|
||||||
|
_diesel__migration__revert_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration revert commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__migration__run_commands] )) ||
|
||||||
|
_diesel__migration__run_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel migration run commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__print-schema_commands] )) ||
|
||||||
|
_diesel__print-schema_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel print-schema commands' commands "$@"
|
||||||
|
}
|
||||||
|
(( $+functions[_diesel__setup_commands] )) ||
|
||||||
|
_diesel__setup_commands() {
|
||||||
|
local commands; commands=()
|
||||||
|
_describe -t commands 'diesel setup commands' commands "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$funcstack[1]" = "_diesel" ]; then
|
||||||
|
_diesel "$@"
|
||||||
|
else
|
||||||
|
compdef _diesel diesel
|
||||||
|
fi
|
|
@ -0,0 +1,110 @@
|
||||||
|
_flamegraph() {
|
||||||
|
local i cur prev opts cmd
|
||||||
|
COMPREPLY=()
|
||||||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
cmd=""
|
||||||
|
opts=""
|
||||||
|
|
||||||
|
for i in ${COMP_WORDS[@]}
|
||||||
|
do
|
||||||
|
case "${cmd},${i}" in
|
||||||
|
",$1")
|
||||||
|
cmd="flamegraph"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
case "${cmd}" in
|
||||||
|
flamegraph)
|
||||||
|
opts="-p -v -o -F -c -i -h -V --pid --completions --verbose --output --open --root --freq --cmd --deterministic --inverted --reverse --notes --min-width --image-width --palette --skip-after --flamechart --ignore-status --no-inline --post-process --perfdata --help --version [TRAILING_ARGUMENTS]..."
|
||||||
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
||||||
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
case "${prev}" in
|
||||||
|
--pid)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-p)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--completions)
|
||||||
|
COMPREPLY=($(compgen -W "bash elvish fish powershell zsh" -- "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--output)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-o)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--root)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--freq)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-F)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--cmd)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
-c)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--notes)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--min-width)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--image-width)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--palette)
|
||||||
|
COMPREPLY=($(compgen -W "aqua blue green hot io java js mem orange perl python purple red rust wakeup yellow" -- "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--skip-after)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--post-process)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
--perfdata)
|
||||||
|
COMPREPLY=($(compgen -f "${cur}"))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=()
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
|
||||||
|
complete -F _flamegraph -o nosort -o bashdefault -o default flamegraph
|
||||||
|
else
|
||||||
|
complete -F _flamegraph -o bashdefault -o default flamegraph
|
||||||
|
fi
|
316
.zshrc
316
.zshrc
|
@ -1,12 +1,12 @@
|
||||||
### ENVVARS
|
### ENVVARS
|
||||||
PATH="/usr/bin:/usr/sbin:$HOME/.local/bin:$HOME/.cargo/bin:/usr/local/bin:$HOME/.deno/bin"
|
# zmodload zsh/zprof # for profiling, also uncomment last line
|
||||||
export PATH
|
|
||||||
export EDITOR=nvim
|
|
||||||
export editor=nvim
|
source "$HOME/.zprofile"
|
||||||
export XDG_CONFIG_HOME=~/.config
|
source "$HOME/.config/user-dirs.dirs"
|
||||||
export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
||||||
export ZSH=$HOME/.zsh
|
export ZSH=$HOME/.zsh
|
||||||
export CLIPBOARD_NOGUI=1 # wayland only allows GUI apps to use the clipboard.
|
#export CLIPBOARD_NOGUI=0 # wayland only allows GUI apps to use the clipboard.
|
||||||
# cb would have to open every 2 seconds and steal
|
# cb would have to open every 2 seconds and steal
|
||||||
# focus. This sucks, so I will have to disable GUI
|
# focus. This sucks, so I will have to disable GUI
|
||||||
# integration (yes that means ctrl+v) for now.
|
# integration (yes that means ctrl+v) for now.
|
||||||
|
@ -14,46 +14,244 @@ export CLIPBOARD_NOGUI=1 # wayland only allows GUI apps to use the clipboard.
|
||||||
# For wayland, set this to `1`
|
# For wayland, set this to `1`
|
||||||
# see https://github.com/Slackadays/Clipboard/issues/171
|
# see https://github.com/Slackadays/Clipboard/issues/171
|
||||||
export DATEFMT='+%a %Y-%m-%d %X'
|
export DATEFMT='+%a %Y-%m-%d %X'
|
||||||
|
export EDITOR=$(which nvim)
|
||||||
|
export VISUAL=$(which nvim)
|
||||||
|
|
||||||
|
|
||||||
### Aliases
|
### Aliases
|
||||||
alias l="lsd -lah --date \"$DATEFMT\""
|
alias e="eza -la"
|
||||||
alias ll="lsd -lh --date \"$DATEFMT\""
|
alias l="lsd -lah --date \"$DATEFMT\" --hyperlink=auto"
|
||||||
alias la="lsd -a --date \"$DATEFMT\""
|
alias ll="lsd -lh --date \"$DATEFMT\" --hyperlink=auto"
|
||||||
alias ls="lsd --date \"$DATEFMT\""
|
alias la="lsd -a --date \"$DATEFMT\" --hyperlink=auto"
|
||||||
|
alias ls="lsd --date \"$DATEFMT\" --hyperlink=auto"
|
||||||
alias grep="grep --color"
|
alias grep="grep --color"
|
||||||
alias egrep="grep -E"
|
alias egrep="grep -E"
|
||||||
alias lgrep="find | grep"
|
alias lgrep="find | grep"
|
||||||
|
alias lagrep="find -exec realpath {} \; | grep"
|
||||||
|
alias llgrep="find -type d -exec lsd -lah {} \;| grep"
|
||||||
alias psgrep="ps axu | grep"
|
alias psgrep="ps axu | grep"
|
||||||
alias plasmarestart="killall plasmashell; kstart5 plasmashell"
|
alias plasmarestart="killall plasmashell; kstart5 plasmashell"
|
||||||
alias isotime='date +"%Y-%m-%dT%H:%M:%S%z"'
|
alias isotime='date +"%Y-%m-%dT%H:%M:%S%z"'
|
||||||
alias isodate='date +%Y-%m-%dT%H:%M:%S%z'
|
alias isodate='date +%Y-%m-%dT%H:%M:%S%z'
|
||||||
alias datefmt='date $DATEFMT'
|
alias datefmt='date $DATEFMT'
|
||||||
alias gg=lazygit
|
alias gg=lazygit
|
||||||
|
alias sg=sourcegit
|
||||||
alias reload="source ~/.zshrc"
|
alias reload="source ~/.zshrc"
|
||||||
alias gls=/bin/ls
|
alias gls=/bin/ls
|
||||||
alias neorg='nvim -c "Neorg workspace $1"'
|
|
||||||
alias bat=batcat
|
alias bat=batcat
|
||||||
alias accon="HOST=$(hostname) conda activate"
|
alias accon="HOST=$(hostname) conda activate"
|
||||||
alias gotemp="cd $(mktemp -d)"
|
alias gotemp="cd $(mktemp -d)"
|
||||||
alias open=xdg-open
|
alias open=xdg-open
|
||||||
|
alias ipb="ip -brief"
|
||||||
|
alias psa="ps -eadf"
|
||||||
|
alias fsize="stat --printf='%s'"
|
||||||
|
alias rg="rg --no-ignore"
|
||||||
|
alias home="cd $HOME"
|
||||||
|
alias ff=firefox
|
||||||
|
alias bell="tput bel"
|
||||||
|
alias fd=fdfind
|
||||||
|
alias nobak="touch .nobackup"
|
||||||
|
alias securerm="shred -zun 100"
|
||||||
|
alias mkpatch="diff -Naru"
|
||||||
|
alias shrug="echo -ne ¯\\\_(ツ)_/¯"
|
||||||
|
alias sheep="echo -ne 🐑"
|
||||||
|
alias knife="echo -ne 🔪"
|
||||||
|
alias bak=backup
|
||||||
|
|
||||||
### Functions
|
### Functions
|
||||||
|
function random() {
|
||||||
|
if [ $# -ne 1 ] || ! [[ $1 =~ ^[0-9]+$ ]] || [ $1 -lt 1 ]; then
|
||||||
|
echo "Error: Please provide one positive integer argument" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
echo $(( (RANDOM % $1) + 1 ))
|
||||||
|
}
|
||||||
function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" }
|
function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" }
|
||||||
function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" }
|
function midfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(M|G|T|P|E)\s" }
|
||||||
function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
|
function smallfiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(B|K)\s" }
|
||||||
function cachekeys () { exec 2>/dev/null;
|
function cachekeys () { exec 2>/dev/null;
|
||||||
eval $(ssh-agent)
|
ssh-agent-start # see ~/.zprofile
|
||||||
ssh-add ~/.ssh/id_rsa
|
ssh-add
|
||||||
}
|
}
|
||||||
function newpass() {
|
function newpass() {
|
||||||
LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-$0}
|
LC_ALL=C tr -dc '[:alnum:]' < /dev/urandom | head -c${1:-40}
|
||||||
}
|
}
|
||||||
function condac() {
|
function condac() {
|
||||||
conda activate $@
|
conda activate $@
|
||||||
export HOST=$(hostname)
|
export HOST=$(hostname)
|
||||||
}
|
}
|
||||||
# TODO: make neorg a function, take a workspace as arg
|
# calculate on shell with `c 1+1`
|
||||||
|
function c() { printf "%s\n" "$@" | bc -l; }
|
||||||
|
# Call Python and execute multiple statements from args
|
||||||
|
function py() {
|
||||||
|
python <<< "
|
||||||
|
from math import *
|
||||||
|
|
||||||
|
def evaluate_and_print(code):
|
||||||
|
for expr in code.split(';'):
|
||||||
|
expr = expr.strip()
|
||||||
|
if '=' in expr:
|
||||||
|
exec(expr)
|
||||||
|
else:
|
||||||
|
result = eval(expr)
|
||||||
|
print(f\"{expr} => {result}\")
|
||||||
|
|
||||||
|
if __name__ == \"__main__\":
|
||||||
|
expr = '$*'
|
||||||
|
evaluate_and_print(expr)
|
||||||
|
"
|
||||||
|
}
|
||||||
|
function countlines() {
|
||||||
|
find . -type f -name "$1" -exec wc -l {} \; | awk '{print $0} {total += $1} END {print "Total lines:", total}'
|
||||||
|
}
|
||||||
|
function git-verify-commit () {
|
||||||
|
git verify-commit $1
|
||||||
|
ret=$?
|
||||||
|
if [ $ret -ne 0 ]; then
|
||||||
|
echo "Commit is not signed."
|
||||||
|
else
|
||||||
|
echo "OK"
|
||||||
|
fi
|
||||||
|
return $ret
|
||||||
|
}
|
||||||
|
function confirm() {
|
||||||
|
bash -c "
|
||||||
|
echo \"To be executed: $@\";
|
||||||
|
read -p \"Confirm (Y/N): \" -n 1 -r;
|
||||||
|
case \"\$REPLY\" in
|
||||||
|
y|Y ) echo \"es\"; eval $@;;
|
||||||
|
n|N ) echo \"o\";;
|
||||||
|
* ) echo -e \"\ninvalid\";;
|
||||||
|
esac" $@
|
||||||
|
}
|
||||||
|
function confirm-important() {
|
||||||
|
echo "Write 'yes do as i say' to confirm that you REALLY want to do this: $@"
|
||||||
|
read
|
||||||
|
if [[ "${REPLY,,}" = "yes do as i say" ]]
|
||||||
|
then
|
||||||
|
eval $@
|
||||||
|
else
|
||||||
|
echo "aborting"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
function writepatch() {
|
||||||
|
target=$1
|
||||||
|
fname=$(basename $target)
|
||||||
|
mkdir -p a b
|
||||||
|
cp -r $target a
|
||||||
|
cp -r $target b
|
||||||
|
nvim b/$fname
|
||||||
|
diff -Naru --color='auto' a/$fname b/$fname
|
||||||
|
}
|
||||||
|
backup() {
|
||||||
|
local compress=0
|
||||||
|
local src=""
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while getopts "z" opt; do
|
||||||
|
case $opt in
|
||||||
|
z) compress=1 ;;
|
||||||
|
*) echo "Usage: backup [-z] file_or_dir"; return 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
|
# Get source file/dir after option processing
|
||||||
|
src="$1"
|
||||||
|
if [ -z "$src" ]; then
|
||||||
|
echo "Error: no source specified"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if source exists
|
||||||
|
if [ ! -e "$src" ]; then
|
||||||
|
echo "Error: $src does not exist"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create backup based on type and options
|
||||||
|
if [ $compress -eq 1 ]; then
|
||||||
|
tar -I zstd -cf "${src}.tar.zstd" "$src"
|
||||||
|
elif [ -d "$src" ]; then
|
||||||
|
cp -r "$src" "${src}.bak.d"
|
||||||
|
else
|
||||||
|
cp "$src" "${src}.bak"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
restore() {
|
||||||
|
local remove=0
|
||||||
|
|
||||||
|
# Parse options
|
||||||
|
while getopts "r" opt; do
|
||||||
|
case $opt in
|
||||||
|
r) remove=1 ;;
|
||||||
|
*) echo "Usage: restore [-r] backup_file"; return 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
|
# Check if argument was provided
|
||||||
|
local src="$1"
|
||||||
|
if [ -z "$src" ]; then
|
||||||
|
echo "Error: no backup file specified"
|
||||||
|
echo "Usage: restore [-r] backup_file"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if source exists
|
||||||
|
if [ ! -e "$src" ]; then
|
||||||
|
echo "Error: $src does not exist"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Function to handle overwrite confirmation
|
||||||
|
confirm_overwrite() {
|
||||||
|
echo -n "$1 already exists. Overwrite? [y/N] "
|
||||||
|
read answer
|
||||||
|
[[ $answer =~ ^[Yy] ]]
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
# Determine backup type and restore accordingly
|
||||||
|
if [[ "$src" == *.tar.zstd ]]; then
|
||||||
|
local dest="${src%.tar.zstd}"
|
||||||
|
if [ -e "$dest" ]; then
|
||||||
|
if ! confirm_overwrite "$dest"; then
|
||||||
|
echo "Restore cancelled"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
rm -rf "$dest"
|
||||||
|
fi
|
||||||
|
tar -I zstd -xf "$src"
|
||||||
|
[ $remove -eq 1 ] && rm "$src"
|
||||||
|
elif [[ "$src" == *.bak.d ]]; then
|
||||||
|
local dest="${src%.bak.d}"
|
||||||
|
if [ -e "$dest" ]; then
|
||||||
|
if ! confirm_overwrite "$dest"; then
|
||||||
|
echo "Restore cancelled"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
rm -rf "$dest"
|
||||||
|
fi
|
||||||
|
cp -r "$src" "$dest"
|
||||||
|
[ $remove -eq 1 ] && rm -rf "$src"
|
||||||
|
elif [[ "$src" == *.bak ]]; then
|
||||||
|
local dest="${src%.bak}"
|
||||||
|
if [ -e "$dest" ]; then
|
||||||
|
if ! confirm_overwrite "$dest"; then
|
||||||
|
echo "Restore cancelled"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
rm -f "$dest"
|
||||||
|
fi
|
||||||
|
cp "$src" "$dest"
|
||||||
|
[ $remove -eq 1 ] && rm "$src"
|
||||||
|
else
|
||||||
|
echo "Error: $src is not a recognized backup format"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
### ---- zsh options -------------------------------------
|
### ---- zsh options -------------------------------------
|
||||||
setopt autocd
|
setopt autocd
|
||||||
|
@ -83,7 +281,7 @@ setopt hist_verify # show command with history expansion to user befo
|
||||||
|
|
||||||
### --- Inputs Config ------------------------------------
|
### --- Inputs Config ------------------------------------
|
||||||
# vim keys, then override stuff.
|
# vim keys, then override stuff.
|
||||||
bindkey -v
|
bindkey -v
|
||||||
bindkey "^[[1;5C" forward-word
|
bindkey "^[[1;5C" forward-word
|
||||||
bindkey "^[[1;5D" backward-word
|
bindkey "^[[1;5D" backward-word
|
||||||
bindkey -s "^X" 'n^M'
|
bindkey -s "^X" 'n^M'
|
||||||
|
@ -164,10 +362,17 @@ fi
|
||||||
### ---- PLUGINS -----------------------------------
|
### ---- PLUGINS -----------------------------------
|
||||||
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
|
source $ZSH/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh
|
||||||
source $ZSH/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
source $ZSH/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||||
|
source $ZSH/plugins/zsh-autoquoter/zsh-autoquoter.zsh
|
||||||
|
ZSH_HIGHLIGHT_HIGHLIGHTERS+=(zaq)
|
||||||
source ~/.local/share/fzf/key-bindings.zsh
|
source ~/.local/share/fzf/key-bindings.zsh
|
||||||
source ~/.local/share/fzf/completion.zsh
|
source ~/.local/share/fzf/completion.zsh
|
||||||
fpath=($ZSH/plugins/zsh-completions/src $fpath)
|
fpath=($ZSH/plugins/zsh-completions/src $fpath)
|
||||||
|
|
||||||
|
ZAQ_PREFIXES+=('git commit( [^ ]##)# -[^ -]#m')
|
||||||
|
ZAQ_PREFIXES_GREEDY+=('py #')
|
||||||
|
ZAQ_PREFIXES_GREEDY+=('c #')
|
||||||
|
ZAQ_PREFIXES_GREEDY+=('countlines #')
|
||||||
|
|
||||||
### --- fzf Config ------------------------------------
|
### --- fzf Config ------------------------------------
|
||||||
export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'"
|
export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'"
|
||||||
export FZF_CTRL_R_OPTS='--no-sort --exact'
|
export FZF_CTRL_R_OPTS='--no-sort --exact'
|
||||||
|
@ -198,23 +403,62 @@ else
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(zoxide init zsh)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
### --- conda Config -------------------------------------
|
### --- completions local -------------------------------------
|
||||||
# >>> conda initialize >>>
|
zstyle ':completion:*' menu select
|
||||||
# !! Contents within this block are managed by 'conda init' !!
|
fpath+=~/.zfunc
|
||||||
__conda_setup="$('/home/plex/.local/share/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
|
||||||
if [ $? -eq 0 ]; then
|
export NVM_DIR="$HOME/.config/nvm"
|
||||||
eval "$__conda_setup"
|
# diese Scheiße läd so ewig, wer auch immer dachte dass das so eine gute idee
|
||||||
else
|
# ist gehört gefeuert. Das muss jeden Tag viele leute minuten kosten.
|
||||||
if [ -f "/home/plex/.local/share/miniconda3/etc/profile.d/conda.sh" ]; then
|
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
. "/home/plex/.local/share/miniconda3/etc/profile.d/conda.sh"
|
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
else
|
|
||||||
export PATH="/home/plex/.local/share/miniconda3/bin:$PATH"
|
# on demand nvm
|
||||||
|
function load_nvm() {
|
||||||
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
}
|
||||||
|
# zprof
|
||||||
|
|
||||||
|
# gpg is cool actually
|
||||||
|
|
||||||
|
# crypto stuff with my gpg keys
|
||||||
|
export KEY_TYPE=ed25519
|
||||||
|
export KEYID=0E777B31ACC5B69B7096C050A466E5C5D6792EE9
|
||||||
|
gpgencrypt() {
|
||||||
|
# Encrypt with progress indicator
|
||||||
|
gpg --encrypt --armor \
|
||||||
|
--sign \
|
||||||
|
-r "${KEYID}" $@
|
||||||
|
}
|
||||||
|
|
||||||
|
gpgsign() {
|
||||||
|
local input="${1:--}" # Default to stdin if no argument
|
||||||
|
if [[ "${input}" != "-" ]] && [[ ! -f "${input}" ]]; then
|
||||||
|
echo "Error: Input file '${input}' not found"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
gpg --clearsign --default-key "${KEYID}" "${input}"
|
||||||
unset __conda_setup
|
}
|
||||||
# <<< conda initialize <<<
|
|
||||||
# we don't want to see (base) constantly, so we do this:
|
gpgverify() {
|
||||||
PS1=$(echo $PS1 | sed 's/(base) //') # remove base
|
local input="${1:--}" # Default to stdin if no argument
|
||||||
|
if [[ "${input}" != "-" ]] && [[ ! -f "${input}" ]]; then
|
||||||
|
echo "Error: Input file '${input}' not found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
gpg --verify "${input}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Git signing convenience function
|
||||||
|
gcsign() {
|
||||||
|
git commit --amend --gpg-sign="${KEYID}" --allow-empty --signoff
|
||||||
|
}
|
||||||
|
|
||||||
|
gpgexport() {
|
||||||
|
# Export public key
|
||||||
|
gpg --armor --export "${KEYID}" > "${1:-public_key.asc}"
|
||||||
|
}
|
||||||
|
|
||||||
### load unversioned zsh code
|
### load unversioned zsh code
|
||||||
if [ -f ~/.zsh.local ]; then
|
if [ -f ~/.zsh.local ]; then
|
||||||
|
@ -222,4 +466,8 @@ if [ -f ~/.zsh.local ]; then
|
||||||
else
|
else
|
||||||
touch ~/.zsh.local
|
touch ~/.zsh.local
|
||||||
fi
|
fi
|
||||||
|
if [ -f ~/.zshenv ]; then
|
||||||
|
source ~/.zshenv
|
||||||
|
else
|
||||||
|
touch ~/.zshenv
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue