|
1 | | -set -l SUBCOMMANDS gui screen full launcher config |
2 | 1 |
|
3 | 2 | #################### |
4 | 3 | # HELPER FUNCTIONS # |
|
67 | 66 | # COMPLETIONS # |
68 | 67 | ############### |
69 | 68 |
|
| 69 | +# define the subcommands |
| 70 | +set -l SUBCOMMANDS gui screen full launcher config |
| 71 | + |
70 | 72 | # No subcommand |
71 | | -complete -c flameshot -n __flameshot_no_positional_args -f -a "$SUBCOMMANDS" |
72 | | -complete -c flameshot -l "help" -s "h" -f -d "Display help message" |
73 | | -complete -c flameshot -l "version" -s "v" -f -d "Display version information" -n __flameshot_no_positional_args |
| 73 | +complete -c flameshot --no-files --arguments "$SUBCOMMANDS" --condition __flameshot_no_positional_args |
| 74 | +complete -c flameshot --long-option "help" --short-option "h" --description "Display help message" --no-files |
| 75 | +complete -c flameshot --long-option "version" --short-option "v" --description "Display version information" --no-files --condition __flameshot_no_positional_args |
74 | 76 |
|
75 | 77 | # GUI subcommand |
76 | | -__flameshot_complete gui -f |
77 | | -__flameshot_complete gui -l "path" -s "p" -rk -d "Output file or directory" |
78 | | -__flameshot_complete gui -l "clipboard" -s "c" -f -d "Copy screenshot to the clipboard" |
79 | | -__flameshot_complete gui -l "delay" -s "d" -frk -d "Delay time in milliseconds" |
80 | | -__flameshot_complete gui -l "region" -frk -d "Screenshot region to select (WxH+X+Y)" -a "(__flameshot_complete_region gui)" |
81 | | -__flameshot_complete gui -l "last-region" -f -d "Repeat screenshot with previously selected region" |
82 | | -__flameshot_complete gui -l "raw" -s "r" -f -d "Print raw PNG capture" |
83 | | -__flameshot_complete gui -l "print-geometry" -s "g" -f -d "Print geometry of the selection" |
84 | | -__flameshot_complete gui -l "upload" -s "u" -f -d "Upload the screenshot" |
85 | | -__flameshot_complete gui -l "pin" -f -d "Pin the screenshot to the screen" |
86 | | -__flameshot_complete gui -l "accept-on-select" -s "s" -f -d "Accept capture as soon as a selection is made" |
| 78 | +__flameshot_complete gui --no-files |
| 79 | +__flameshot_complete gui --long-option "path" --short-option "p" --description "Output file or directory" --require-parameter |
| 80 | +__flameshot_complete gui --long-option "clipboard" --short-option "c" --description "Copy screenshot to the clipboard" --no-files |
| 81 | +__flameshot_complete gui --long-option "delay" --short-option "d" --description "Delay time in milliseconds" --require-parameter --no-files |
| 82 | +__flameshot_complete gui --long-option "region" --description "Screenshot region to select (WxH+X+Y)" --require-parameter --arguments "(__flameshot_complete_region gui)" |
| 83 | +__flameshot_complete gui --long-option "last-region" --description "Repeat screenshot with previously selected region" --no-files |
| 84 | +__flameshot_complete gui --long-option "raw" --short-option "r" --description "Print raw PNG capture" --no-files |
| 85 | +__flameshot_complete gui --long-option "print-geometry" --short-option "g" --description "Print geometry of the selection" --no-files |
| 86 | +__flameshot_complete gui --long-option "upload" --short-option "u" --description "Upload the screenshot" --no-files |
| 87 | +__flameshot_complete gui --long-option "pin" --description "Pin the screenshot to the screen" --no-files |
| 88 | +__flameshot_complete gui --long-option "accept-on-select" --short-option "s" --description "Accept capture as soon as a selection is made" --no-files |
| 89 | +__flameshot_complete gui --long-option "help" --short-option "h" --description "Show the available arguments" --no-files |
87 | 90 |
|
88 | 91 | # SCREEN subcommand |
89 | | -__flameshot_complete screen -f |
90 | | -__flameshot_complete screen -l "number" -s "n" -frk -d "Screen number (starting from 0)" -a "(__flameshot_complete_screen_number)" |
91 | | -__flameshot_complete screen -l "path" -s "p" -rk -d "Output file or directory" |
92 | | -__flameshot_complete screen -l "clipboard" -s "c" -f -d "Copy screenshot to the clipboard" |
93 | | -__flameshot_complete screen -l "delay" -s "d" -frk -d "Delay time in milliseconds" |
94 | | -__flameshot_complete screen -l "region" -frk -d "Screenshot region to select (WxH+X+Y)" -a "(__flameshot_complete_region screen)" |
95 | | -__flameshot_complete screen -l "last-region" -f -d "Repeat screenshot with previously selected region" |
96 | | -__flameshot_complete screen -l "raw" -s "r" -f -d "Print raw PNG capture" |
97 | | -__flameshot_complete screen -l "upload" -s "u" -f -d "Upload the screenshot" |
98 | | -__flameshot_complete screen -l "pin" -f -d "Pin the screenshot to the screen" |
| 92 | +__flameshot_complete screen --no-files |
| 93 | +__flameshot_complete screen --long-option "number" --short-option "n" --description "Screen number (starting from 0)" --require-parameter --no-files --arguments "(__flameshot_complete_screen_number)" |
| 94 | +__flameshot_complete screen --long-option "path" --short-option "p" --description "Output file or directory" --require-parameter |
| 95 | +__flameshot_complete screen --long-option "clipboard" --short-option "c" --description "Copy screenshot to the clipboard" --no-files |
| 96 | +__flameshot_complete screen --long-option "delay" --short-option "d" --description "Delay time in milliseconds" --require-parameter --no-files |
| 97 | +__flameshot_complete screen --long-option "region" --description "Screenshot region to select (WxH+X+Y)" --require-parameter --no-files --arguments "(__flameshot_complete_region screen)" |
| 98 | +__flameshot_complete screen --long-option "raw" --short-option "r" --description "Print raw PNG capture" --no-files |
| 99 | +__flameshot_complete screen --long-option "upload" --short-option "u" --description "Upload the screenshot" --no-files |
| 100 | +__flameshot_complete screen --long-option "pin" --description "Pin the screenshot to the screen" --no-files |
| 101 | +__flameshot_complete screen --long-option "help" --short-option "h" --description "Show the available arguments" --no-files |
99 | 102 |
|
100 | 103 | # FULL command |
101 | | -__flameshot_complete full -f |
102 | | -__flameshot_complete full -l "path" -s "p" -rk -d "Output file or directory" |
103 | | -__flameshot_complete full -l "clipboard" -s "c" -f -d "Copy screenshot to the clipboard" |
104 | | -__flameshot_complete full -l "delay" -s "d" -frk -d "Delay time in milliseconds" |
105 | | -__flameshot_complete full -l "region" -frk -d "Screenshot region to select (WxH+X+Y)" -a "(__flameshot_complete_region full)" |
106 | | -__flameshot_complete full -l "last-region" -f -d "Repeat screenshot with previously selected region" |
107 | | -__flameshot_complete full -l "raw" -s "r" -f -d "Print raw PNG capture" |
108 | | -__flameshot_complete full -l "upload" -s "u" -f -d "Upload the screenshot" |
109 | | - |
110 | | -# LAUNCHER command doesn't have any completions specific to itself |
111 | | - |
112 | | -# CONFIG command -- TODO will be completed in a future version |
113 | | -__flameshot_complete config -f |
114 | | -__flameshot_complete config -l "check" -f -d "Check the configuration for errors" |
| 104 | +__flameshot_complete full --no-files |
| 105 | +__flameshot_complete full --long-option "path" --short-option "p" --description "Output file or directory" --require-parameter |
| 106 | +__flameshot_complete full --long-option "clipboard" --short-option "c" --description "Copy screenshot to the clipboard" --no-files |
| 107 | +__flameshot_complete full --long-option "delay" --short-option "d" --description "Delay time in milliseconds" --require-parameter --no-files |
| 108 | +__flameshot_complete full --long-option "region" --description "Screenshot region to select (WxH+X+Y)" --require-parameter --no-files --arguments "(__flameshot_complete_region full)" --keep-order |
| 109 | +__flameshot_complete full --long-option "raw" --short-option "r" --description "Print raw PNG capture" --no-files |
| 110 | +__flameshot_complete full --long-option "upload" --short-option "u" --description "Upload the screenshot" --no-files |
| 111 | +__flameshot_complete full --long-option "help" --short-option "h" --description "Show the available arguments" --no-files |
| 112 | + |
| 113 | +# LAUNCHER command |
| 114 | +__flameshot_complete launcher --no-files |
| 115 | + |
| 116 | +# CONFIG command |
| 117 | +__flameshot_complete config --no-files |
| 118 | +__flameshot_complete config --long-option "autostart" --short-option "a" --description "Enable or disable run at startup" --require-parameter --no-files --arguments "true false" |
| 119 | +__flameshot_complete config --long-option "filename" --short-option "f" --description "Set the filename pattern" --require-parameter --no-files |
| 120 | +__flameshot_complete config --long-option "notification" --short-option "n" --description "Enable or disable the notification" --require-parameter --no-files --arguments "true false" |
| 121 | +__flameshot_complete config --long-option "trayicon" --short-option "t" --description "Enable or disable the tray icon" --require-parameter --no-files --arguments "true false" |
| 122 | +__flameshot_complete config --long-option "showhelp" --short-option "s" --description "Show the help message in the capture mode" --require-parameter --no-files --arguments "true false" |
| 123 | +__flameshot_complete config --long-option "maincolor" --short-option "m" --description "Define the main UI color (hexadecimal)" --require-parameter --no-files |
| 124 | +__flameshot_complete config --long-option "contrastcolor" --short-option "k" --description "Define the contrast UI color (hexadecimal)" --require-parameter --no-files |
| 125 | +__flameshot_complete config --long-option "check" --description "Check the configuration for errors" --no-files |
| 126 | +__flameshot_complete config --long-option "help" --short-option "h" --description "Show the available arguments" --no-files |
0 commit comments