Skip to content

Commit b5308d0

Browse files
committed
Remove experimental Fish shell support
1 parent 0582580 commit b5308d0

File tree

9 files changed

+6
-72
lines changed

9 files changed

+6
-72
lines changed

README.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -704,12 +704,6 @@ or
704704
shell = "zsh"
705705
```
706706

707-
as well as the experimental
708-
709-
```toml
710-
shell = "fish"
711-
```
712-
713707
#### `match`
714708

715709
A list of glob patterns to match against a plugin’s contents. The first pattern
@@ -744,21 +738,6 @@ match = [
744738
]
745739
```
746740

747-
If the shell is Fish then this defaults to
748-
749-
```toml
750-
match = [
751-
"conf.d/{{ name }}.fish",
752-
"conf.d/{!_*,*}.fish",
753-
"{completions,functions}/{{ name }}.fish",
754-
"{completions,functions}/{!_*,*}.fish",
755-
"{completions,functions}/*.fish",
756-
"{{ name }}.fish",
757-
"{!_*,*}.fish",
758-
"*.fish"
759-
]
760-
```
761-
762741
#### `apply`
763742

764743
A list of template names to apply to all plugins by default (see

completions/sheldon.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ _sheldon() {
186186
fi
187187
case "${prev}" in
188188
--shell)
189-
COMPREPLY=($(compgen -W "bash fish zsh" -- "${cur}"))
189+
COMPREPLY=($(compgen -W "bash zsh" -- "${cur}"))
190190
return 0
191191
;;
192192
*)

completions/sheldon.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ _sheldon() {
4040
case $line[1] in
4141
(init)
4242
_arguments "${_arguments_options[@]}" : \
43-
'--shell=[The type of shell]:SHELL:(bash fish zsh)' \
43+
'--shell=[The type of shell]:SHELL:(bash zsh)' \
4444
'-h[Print help]' \
4545
'--help[Print help]' \
4646
&& ret=0

docs/src/Configuration.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,6 @@ or
311311
shell = "zsh"
312312
```
313313

314-
as well as the experimental
315-
316-
```toml
317-
shell = "fish"
318-
```
319-
320314
### `match`
321315

322316
A list of glob patterns to match against a plugin's contents. The first pattern
@@ -351,21 +345,6 @@ match = [
351345
]
352346
```
353347

354-
If the shell is Fish then this defaults to
355-
356-
```toml
357-
match = [
358-
"conf.d/{{ name }}.fish",
359-
"conf.d/{!_*,*}.fish",
360-
"{completions,functions}/{{ name }}.fish",
361-
"{completions,functions}/{!_*,*}.fish",
362-
"{completions,functions}/*.fish",
363-
"{{ name }}.fish",
364-
"{!_*,*}.fish",
365-
"*.fish"
366-
]
367-
```
368-
369348
### `apply`
370349

371350
A list of template names to apply to all plugins by default (see

src/cli/raw.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,12 @@ impl clap::ValueEnum for ColorChoice {
212212

213213
impl clap::ValueEnum for Shell {
214214
fn value_variants<'a>() -> &'a [Self] {
215-
&[Shell::Bash, Shell::Fish, Shell::Zsh]
215+
&[Shell::Bash, Shell::Zsh]
216216
}
217217

218218
fn to_possible_value(&self) -> Option<PossibleValue> {
219219
Some(match self {
220220
Shell::Bash => PossibleValue::new("bash"),
221-
Shell::Fish => PossibleValue::new("fish"),
222221
Shell::Zsh => PossibleValue::new("zsh"),
223222
})
224223
}

src/cli/testdata/raw_opt_init_help.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Initialize a new config file
33
Usage: sheldon init [OPTIONS]
44

55
Options:
6-
--shell <SHELL> The type of shell [possible values: bash, fish, zsh]
6+
--shell <SHELL> The type of shell [possible values: bash, zsh]
77
-h, --help Print help

src/config/file.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ impl fmt::Display for Shell {
115115
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
116116
match self {
117117
Self::Bash => f.write_str("bash"),
118-
Self::Fish => f.write_str("fish"),
119118
Self::Zsh => f.write_str("zsh"),
120119
}
121120
}
@@ -184,7 +183,7 @@ impl Default for Shell {
184183

185184
/// Produced when we fail to parse the shell type.
186185
#[derive(Debug, Error)]
187-
#[error("expected one of `bash`, `fish`, or `zsh`, got `{}`", self.0)]
186+
#[error("expected one of `bash` or `zsh`, got `{}`", self.0)]
188187
pub struct ParseShellError(String);
189188

190189
impl FromStr for Shell {
@@ -193,7 +192,6 @@ impl FromStr for Shell {
193192
fn from_str(s: &str) -> result::Result<Self, Self::Err> {
194193
match &*s.to_lowercase() {
195194
"bash" => Ok(Self::Bash),
196-
"fish" => Ok(Self::Fish),
197195
"zsh" => Ok(Self::Zsh),
198196
s => Err(ParseShellError(s.to_string())),
199197
}
@@ -374,7 +372,7 @@ mod tests {
374372
|
375373
1 | s = 'ksh'
376374
| ^^^^^
377-
expected one of `bash`, `fish`, or `zsh`, got `ksh`
375+
expected one of `bash` or `zsh`, got `ksh`
378376
"
379377
);
380378
}

src/config/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ pub struct Config {
4040
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
4141
pub enum Shell {
4242
Bash,
43-
Fish,
4443
Zsh,
4544
}
4645

src/lock/mod.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -184,18 +184,6 @@ impl Shell {
184184
"*.sh"
185185
]
186186
});
187-
static DEFAULT_MATCHES_FISH: Lazy<Vec<String>> = Lazy::new(|| {
188-
vec_into![
189-
"conf.d/{{ name }}.fish",
190-
"conf.d/{!_*,*}.fish",
191-
"{completions,functions}/{{ name }}.fish",
192-
"{completions,functions}/{!_*,*}.fish",
193-
"{completions,functions}/*.fish",
194-
"{{ name }}.fish",
195-
"{!_*,*}.fish",
196-
"*.fish"
197-
]
198-
});
199187
static DEFAULT_MATCHES_ZSH: Lazy<Vec<String>> = Lazy::new(|| {
200188
vec_into![
201189
"{{ name }}.plugin.zsh",
@@ -210,7 +198,6 @@ impl Shell {
210198
});
211199
match self {
212200
Self::Bash => &DEFAULT_MATCHES_BASH,
213-
Self::Fish => &DEFAULT_MATCHES_FISH,
214201
Self::Zsh => &DEFAULT_MATCHES_ZSH,
215202
}
216203
}
@@ -223,12 +210,6 @@ impl Shell {
223210
"source" => "{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"\n{% endfor %}{{ hooks?.post | nl }}"
224211
}
225212
});
226-
static DEFAULT_TEMPLATES_FISH: Lazy<IndexMap<String, String>> = Lazy::new(|| {
227-
indexmap_into! {
228-
"add_path" => "fish_add_path \"{{ dir }}\"",
229-
"source" => "{{ hooks?.pre | nl }}{% for file in files %}source \"{{ file }}\"\n{% endfor %}{{ hooks?.post | nl }}"
230-
}
231-
});
232213
static DEFAULT_TEMPLATES_ZSH: Lazy<IndexMap<String, String>> = Lazy::new(|| {
233214
indexmap_into! {
234215
"PATH" => "export PATH=\"{{ dir }}:$PATH\"",
@@ -239,7 +220,6 @@ impl Shell {
239220
});
240221
match self {
241222
Self::Bash => &DEFAULT_TEMPLATES_BASH,
242-
Self::Fish => &DEFAULT_TEMPLATES_FISH,
243223
Self::Zsh => &DEFAULT_TEMPLATES_ZSH,
244224
}
245225
}

0 commit comments

Comments
 (0)