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:
initializecreate-config
You can use any of these aliases instead of the primary command name:
deeplint init
deeplint initialize
deeplint create-configAll 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)
deeplint iThis 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)
deeplint -iBoth forms are equivalent to:
deeplint initShort 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.,
ior-i, not-i=valueor-ivalue)The short alias must be the first argument after the command name
You can combine short aliases with options (e.g.,
i --forceor-i --force)
For example, these are all valid ways to use short aliases:
deeplint i
deeplint i --force
deeplint h initWith dash prefix (backward compatibility):
deeplint -i
deeplint -i --force
deeplint -h initBut these are not valid:
deeplint i=value # Not valid, use i --option=value instead
deeplint iforce # Not valid, use i --force instead
deeplint -i=value # Not valid, use -i --option=value instead
deeplint -iforce # Not valid, use -i --force insteadAvailable 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
deeplint r
deeplint runYou can also use the dash prefix for backward compatibility:
deeplint -r
deeplint -runInit 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
deeplint init
deeplint initialize
deeplint create-config
deeplint iYou can also use the dash prefix for backward compatibility:
deeplint -iHelp Command
The help command displays help information for DeepLint commands.
Full-Word Aliases:
?: Display help information
Short Aliases:
h: Display help information
deeplint help
deeplint ?
deeplint hYou can also use the dash prefix for backward compatibility:
deeplint -hCombining Aliases with Options
You can combine aliases with command options:
deeplint i --forceOr with the dash prefix for backward compatibility:
deeplint -i --forceBoth are equivalent to:
deeplint init --forceFinding Command Aliases
To see the aliases for a specific command, use the help command:
deeplint help <command>For example:
deeplint help initThis 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
Learn more about DeepLint's help system
Explore verbose mode for more detailed output
For more information about DeepLint's commands, see the help command:
deeplint helpLast updated