File tree Expand file tree Collapse file tree 30 files changed +144
-54
lines changed Expand file tree Collapse file tree 30 files changed +144
-54
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,13 @@ colorly_usage() {
59
59
60
60
# :command.inspect_args
61
61
inspect_args () {
62
- echo args:
63
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
62
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
63
+ if (( ${# args[@]} )) ; then
64
+ echo args:
65
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
66
+ else
67
+ echo args: none
68
+ fi
64
69
}
65
70
66
71
# :command.user_lib
Original file line number Diff line number Diff line change @@ -115,8 +115,13 @@ ftp_download_usage() {
115
115
116
116
# :command.inspect_args
117
117
inspect_args () {
118
- echo args:
119
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
118
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
119
+ if (( ${# args[@]} )) ; then
120
+ echo args:
121
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
122
+ else
123
+ echo args: none
124
+ fi
120
125
}
121
126
122
127
# :command.command_functions
Original file line number Diff line number Diff line change @@ -162,8 +162,13 @@ ftp_logout_usage() {
162
162
163
163
# :command.inspect_args
164
164
inspect_args () {
165
- echo args:
166
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
165
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
166
+ if (( ${# args[@]} )) ; then
167
+ echo args:
168
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
169
+ else
170
+ echo args: none
171
+ fi
167
172
}
168
173
169
174
# :command.command_functions
Original file line number Diff line number Diff line change @@ -245,8 +245,13 @@ cli_file_edit_usage() {
245
245
246
246
# :command.inspect_args
247
247
inspect_args () {
248
- echo args:
249
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
248
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
249
+ if (( ${# args[@]} )) ; then
250
+ echo args:
251
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
252
+ else
253
+ echo args: none
254
+ fi
250
255
}
251
256
252
257
# :command.command_functions
Original file line number Diff line number Diff line change @@ -154,8 +154,13 @@ cli_upload_usage() {
154
154
155
155
# :command.inspect_args
156
156
inspect_args () {
157
- echo args:
158
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
157
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
158
+ if (( ${# args[@]} )) ; then
159
+ echo args:
160
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
161
+ else
162
+ echo args: none
163
+ fi
159
164
}
160
165
161
166
# :command.command_functions
Original file line number Diff line number Diff line change @@ -161,8 +161,13 @@ configly_list_usage() {
161
161
162
162
# :command.inspect_args
163
163
inspect_args () {
164
- echo args:
165
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
164
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
165
+ if (( ${# args[@]} )) ; then
166
+ echo args:
167
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
168
+ else
169
+ echo args: none
170
+ fi
166
171
}
167
172
168
173
# :command.user_lib
Original file line number Diff line number Diff line change @@ -55,8 +55,13 @@ download_usage() {
55
55
56
56
# :command.inspect_args
57
57
inspect_args () {
58
- echo args:
59
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
58
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
59
+ if (( ${# args[@]} )) ; then
60
+ echo args:
61
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
62
+ else
63
+ echo args: none
64
+ fi
60
65
}
61
66
62
67
# :command.user_lib
Original file line number Diff line number Diff line change @@ -58,8 +58,13 @@ download_usage() {
58
58
59
59
# :command.inspect_args
60
60
inspect_args () {
61
- echo args:
62
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
61
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
62
+ if (( ${# args[@]} )) ; then
63
+ echo args:
64
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
65
+ else
66
+ echo args: none
67
+ fi
63
68
}
64
69
65
70
# :command.command_functions
Original file line number Diff line number Diff line change @@ -68,8 +68,13 @@ convert_usage() {
68
68
69
69
# :command.inspect_args
70
70
inspect_args () {
71
- echo args:
72
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
71
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
72
+ if (( ${# args[@]} )) ; then
73
+ echo args:
74
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
75
+ else
76
+ echo args: none
77
+ fi
73
78
}
74
79
75
80
# :command.command_functions
Original file line number Diff line number Diff line change @@ -93,8 +93,13 @@ cli_upload_usage() {
93
93
94
94
# :command.inspect_args
95
95
inspect_args () {
96
- echo args:
97
- for k in " ${! args[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
96
+ readarray -t sorted_keys < <( printf ' %s\n' " ${! args[@]} " | sort)
97
+ if (( ${# args[@]} )) ; then
98
+ echo args:
99
+ for k in " ${sorted_keys[@]} " ; do echo " - \$ {args[$k ]} = ${args[$k]} " ; done
100
+ else
101
+ echo args: none
102
+ fi
98
103
}
99
104
100
105
# :command.command_functions
You can’t perform that action at this time.
0 commit comments