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.
- Kontext
- Single-quoted strings and unquoted text.
Convert to Raw String
Convert a double-quoted string into an equivalent single-quoted string.
- Kontext
- 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.
- Kontext
- Single quoted and double-quoted strings.
Convert to Legacy `...` Notation
Convert a subshell command into the equivalent backquote command.
Both ()
and $()
are converted into ``
.
- Kontext
- Subshell commands.
Convert to $(...) Notation
Convert a legacy backquote command substitution `` element into the equivalent subshell element.
- Kontext
- 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.
- Kontext
- Double-quoted strings.
Remove String Escaping
Removes escaping from a quoted string. Please note, that this intention may change the semantics of your script.
- Kontext
- 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
.
- Kontext
- 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.
- Kontext
- Names of function definitions without the
function
keyword.
Remove Function Keyword
Removes the function keyword of function declarations.
- Kontext
- 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.
- Kontext
- Single-quoted and double-quoted strings.
Switch Bats-Core Test Marker Style
Switch between @test
and #@test
marker styles of bats-core.
- Kontext
- Names of bats-core test functions or the test markers
@test
and#@test
.