Command Aliases
This guide explains how to use DeepLint's command aliases to save time and improve your workflow.
Overview
DeepLint provides two types of command aliases:
Full-word aliases: Alternative names for commands that are more descriptive or intuitive
Short aliases: Single-character shortcuts for frequently used commands
Aliases make it easier to use DeepLint by providing multiple ways to invoke the same command.
Using Full-Word Aliases
Full-word aliases are alternative names for commands that you can use interchangeably with the primary command name. For example, the init
command has the following aliases:
initialize
create-config
You can use any of these aliases instead of the primary command name:
All of these commands do exactly the same thing.
Using Short Aliases
Short aliases are single-character shortcuts for commands. For example, the init
command has the short alias i
. You can use short aliases in two ways:
Without Dash (Recommended)
This is the recommended way to use short aliases, following the pattern used by tools like npm (npm i
for install).
With Dash (Supported for Backward Compatibility)
Both forms are equivalent to:
Short aliases are particularly useful for frequently used commands, as they require less typing.
How Short Aliases Work
Short aliases in DeepLint work by converting the short alias to the corresponding command name before processing the command-line arguments. This means that:
The short alias must be a separate argument (e.g.,
i
or-i
, not-i=value
or-ivalue
)The short alias must be the first argument after the command name
You can combine short aliases with options (e.g.,
i --force
or-i --force
)
For example, these are all valid ways to use short aliases:
With dash prefix (backward compatibility):
But these are not valid:
Available Aliases
Here's a list of available commands and their aliases:
Default Command (Run)
The default command runs when you don't specify a command (just deeplint
).
Short Aliases:
r
: Run DeepLint on staged changesrun
: Run DeepLint on staged changes
You can also use the dash prefix for backward compatibility:
Init Command
The init
command initializes DeepLint in your project.
Full-Word Aliases:
initialize
: Initialize DeepLint in the current projectcreate-config
: Create a DeepLint configuration file
Short Aliases:
i
: Initialize DeepLint in the current project
You can also use the dash prefix for backward compatibility:
Help Command
The help
command displays help information for DeepLint commands.
Full-Word Aliases:
?
: Display help information
Short Aliases:
h
: Display help information
You can also use the dash prefix for backward compatibility:
Combining Aliases with Options
You can combine aliases with command options:
Or with the dash prefix for backward compatibility:
Both are equivalent to:
Finding Command Aliases
To see the aliases for a specific command, use the help command:
For example:
This will display information about the command, including its aliases.
Best Practices
Use short aliases for frequent operations: Short aliases are designed for commands you use often
Use full-word aliases for clarity in scripts: When writing scripts or documentation, consider using full-word aliases for better readability
Learn the aliases for your most-used commands: Memorizing a few key aliases can significantly speed up your workflow
Next Steps
Now that you understand how to use command aliases, you can:
Try using aliases for your most common DeepLint operations
For more information about DeepLint's commands, see the help command:
Last updated