pub enum ShellDialect {
Unknown,
Sh,
Bash,
Dash,
Ksh,
Mksh,
Zsh,
}Expand description
Shell dialect selection used by the linter.
Variants§
Implementations§
Source§impl ShellDialect
impl ShellDialect
pub fn parser_dialect(self) -> ShellDialect
pub fn semantic_dialect(self) -> ShellDialect
pub fn shell_profile(self) -> ShellProfile
pub fn from_name(name: &str) -> Self
pub fn infer(source: &str, path: Option<&Path>) -> Self
pub fn infer_from_path(path: &Path) -> Self
Sourcepub fn is_zsh_autoload_tag_line(line: &str) -> bool
pub fn is_zsh_autoload_tag_line(line: &str) -> bool
Returns true when line is a zsh autoload/completion tag comment
(#compdef … or #autoload …).
compinit requires this tag on the first line of a completion/autoload
function file, so such files lead with the tag instead of a shebang and
are typically extensionless. Shared by dialect inference and by file
discovery (shuck-discover) so these files are recognized as zsh shell
scripts. The tag must directly follow # (no space), matching compinit.
Trait Implementations§
Source§impl Clone for ShellDialect
impl Clone for ShellDialect
Source§fn clone(&self) -> ShellDialect
fn clone(&self) -> ShellDialect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ShellDialect
Source§impl Debug for ShellDialect
impl Debug for ShellDialect
Source§impl Default for ShellDialect
impl Default for ShellDialect
Source§fn default() -> ShellDialect
fn default() -> ShellDialect
Returns the “default value” for a type. Read more
impl Eq for ShellDialect
Source§impl Hash for ShellDialect
impl Hash for ShellDialect
Source§impl PartialEq for ShellDialect
impl PartialEq for ShellDialect
impl StructuralPartialEq for ShellDialect
Auto Trait Implementations§
impl Freeze for ShellDialect
impl RefUnwindSafe for ShellDialect
impl Send for ShellDialect
impl Sync for ShellDialect
impl Unpin for ShellDialect
impl UnsafeUnpin for ShellDialect
impl UnwindSafe for ShellDialect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more