Intentions of BashSupport Pro
BashSupport Pro provides intentions to help you change common aspects of shell scripts efficiently.
Convert to Quoted String
Convert a single-quoted string like 'text'
or a plain, unquoted word like text
into an equivalent double-quoted string.
- Контекст
- Single-quoted strings and unquoted text.
Convert to Raw String
Convert a double-quoted string into an equivalent single-quoted string.
- Контекст
- Double-quoted strings, which only contain static values. String with variable references, subshells or other dynamic content are excluded from this intention.
Convert to Unquoted Literal
Convert a single-quoted or double-quoted string into a text literal without quotes. Special characters are escaped, when needed.
- Контекст
- Single quoted and double-quoted strings.
Convert to Legacy `...` Notation
Convert a subshell command into the equivalent backquote command.
Both ()
and $()
are converted into ``
.
- Контекст
- Subshell commands.
Convert to $(...) Notation
Convert a legacy backquote command substitution `` element into the equivalent subshell element.
- Контекст
- Legacy backquote commands
Escape String
Adds escaping to a string to turn variable references into literal string values. Please note, that this changes the semantics of the escaped text.
- Контекст
- Double-quoted strings.
Remove String Escaping
Removes escaping from a quoted string. Please note, that this intention may change the semantics of your script.
- Контекст
- Double-quoted strings or single-quoted strings like
$'text'
, which support escapes.
Convert to Variable Reference $Name
Converts a simple parameter expansion ${name}
into the equivalent variable reference $name
.
- Контекст
- Simple parameter expansions without operators.
Convert to Parameter Expansion ${Name}
Converts a simple variable reference into the equivalent parameter expansion.
Add Function Keyword
Adds a function keyword to functions declared in Bash files.
- Контекст
- Names of function definitions without the
function
keyword.
Remove Function Keyword
Removes the function keyword of function declarations.
- Контекст
- The
function
keyword of function definitions.
Remove Quotes (May Change Semantics)
Remove the quote of single-quoted or double-quoted strings. Only the quotes are removed, no escaping or other transformations are applied. Please note, that this intention may change the semantics of your script.
- Контекст
- Single-quoted and double-quoted strings.
Switch Bats-Core Test Marker Style
Switch between @test
and #@test
marker styles of bats-core.
- Контекст
- Names of bats-core test functions or the test markers
@test
and#@test
.