Skip to content

Commit 0897849

Browse files
committed
remove array and process file names as one argument
1 parent e222ef6 commit 0897849

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

.typo-ci.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ dictionaries:
99
- en_GB
1010
- fr
1111

12-
# Any files/folders we should ignore?
12+
13+
# Files and folders to ignore
1314
excluded_files:
1415
- "esperanto/*"
1516
- "vendor/**/*"
@@ -26,32 +27,46 @@ excluded_files:
2627
- "Gemfile.lock"
2728
- ".typo-ci.yml"
2829

29-
# Any typos we should ignore?
30+
31+
# Known spellings to ignore
3032
excluded_words:
3133
- Biffle
3234
- calibreapp
3335
- Crashlytics
36+
- csharp # CodeQL Analysis
37+
- cyberciti # cyberciti.biz
3438
- ffs
3539
- ibiqlik # ibiqlik/action-yamllint
3640
- LucasLarson
3741
- Mackup
38-
- omz
42+
- nixCraft # Vivek Gite, cyberciti.biz
43+
- omz # ohmyzsh
3944
- peter-evans # peter-evans/create-pull-request
4045
- rustup
4146
- sobolevn # sobolevn/misspell-fixer-action
4247
- typoci
4348
- uncommenting
49+
- VivekGite # nixCraft, cyberciti.biz
4450

4551
# AsciiDoc
4652
- adoc
4753

54+
# CSS
55+
- webtv
56+
- konqueror
57+
- freebsd
58+
4859
# Clang, GCC
60+
- argc
61+
- argv
4962
- cbp
5063
- climits
5164
- cstring
5265
- ctor
5366
- dtor
5467
- dylib
68+
- envc
69+
- envp
5570
- fcaret
5671
- fdiagnostics
5772
- fdiagnostics-fixit-info
@@ -90,6 +105,7 @@ excluded_words:
90105
# Git
91106
- gmv # homemade alias to `git mv`
92107
- gunstage
108+
- osxkeychain
93109
- unstage
94110
- unstagers
95111
- unstaging
@@ -142,5 +158,6 @@ excluded_words:
142158
- Zunit
143159
- zwc
144160

145-
# Would you like filenames to also be spellchecked?
161+
162+
# Filename spellchecking
146163
spellcheck_filenames: true

gunstage.plugin.zsh

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,14 @@ gunstage () { # 🔫 `git unstage` as a service
3333
fi
3434

3535
# check if `gunstage` was called with any arguments, which are
36-
# file names
36+
# a string of file names
3737
if [ $# -gt 0 ]; then
3838

39-
# create an empty array for the file name arguments
40-
arguments=()
41-
for index in "$@"; do
42-
43-
# for each file name, one at a time, unstage it
44-
# running a string as a command
45-
# https://unix.stackexchange.com/q/356534#comment631887_356534
46-
eval "$unstage" "${index[@]}"
47-
arguments+=("$index")
48-
done
39+
# unstage all files named in the string and
40+
# run the string as a command
41+
# https://unix.stackexchange.com/q/356534#comment631887_356534
42+
# https://github.com/koalaman/shellcheck/wiki/SC2145/c11a85d1d22030fbf846eee09a2dce1f896fa5ae#rationale
43+
eval "$unstage $*"
4944

5045
# if there were no gunstage arguments, we unstage everything in this
5146
# directory and below

0 commit comments

Comments
 (0)