Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

Arguments

Module for working with an Arguments instance

Functions and values

Function or valueDescription
append s a
Signature: s:seq<string> -> a:Arguments -> Arguments

Append all arguments after the current arguments

appendIf value paramName a
Signature: value:bool -> paramName:string -> a:Arguments -> Arguments

Append an argument to a command line if a condition is true.

appendNotEmpty paramName paramValue a
Signature: paramName:string -> paramValue:string -> a:Arguments -> Arguments

Append an argument prefixed by another if the value is not null or empty

appendOption paramName paramValue a
Signature: paramName:string -> paramValue:string option -> a:Arguments -> Arguments

Append an argument prefixed by another if the value is Some.

appendRaw s a
Signature: s:string -> a:Arguments -> Arguments

Appends the given raw argument to the command line, you can not use other methods for this to work This method is only required if you NEED quotes WITHIN your argument (some old Microsoft Tools). "raw" methods are not compatible with non-raw methods.

appendRawEscaped argPrefix paramValue a
Signature: argPrefix:string -> paramValue:string -> a:Arguments -> Arguments

Appends the given raw argument to the command line, you can not use other methods for this to work This allows unusal quoting with the given prefix, like /k:"myarg" ("/k:" would be the argPrefix) This method is only required if you NEED quotes WITHIN your argument (some old Microsoft Tools). "raw" methods are not compatible with non-raw methods.

appendRawEscapedIf(...)
Signature: b:bool -> argPrefix:string -> paramValue:string -> a:Arguments -> Arguments

Append an argument prefixed by another if the value is Some. This method is only required if you NEED quotes WITHIN your argument (some old Microsoft Tools). "raw" methods are not compatible with non-raw methods.

appendRawEscapedNotEmpty(...)
Signature: argPrefix:string -> paramValue:string -> a:Arguments -> Arguments

Append an argument prefixed by another if the value is Some. This method is only required if you NEED quotes WITHIN your argument (some old Microsoft Tools). "raw" methods are not compatible with non-raw methods.

appendRawEscapedOption(...)
Signature: argPrefix:string -> paramValue:string option -> a:Arguments -> Arguments

Append an argument prefixed by another if the value is Some. This method is only required if you NEED quotes WITHIN your argument (some old Microsoft Tools). "raw" methods are not compatible with non-raw methods.

ofList(a)
Signature: a:string list -> Arguments

Create a arguments instance from a list.

toArray(a)
Signature: a:Arguments -> string []

Convert the arguments instance to a string array

toLinuxShellCommandLine(a)
Signature: a:Arguments -> string

Escape the given argument list according to a unix shell (bash)

toList(a)
Signature: a:Arguments -> string list

Convert the arguments instance to a string list

toStartInfo(a)
Signature: a:Arguments -> string

Create a new command line string which can be used in a ProcessStartInfo object. If given, returns the exact input of OfWindowsCommandLine otherwise ToWindowsCommandLine (with some special code for mono) is used.

toWindowsCommandLine(a)
Signature: a:Arguments -> string

This is the reverse of https://msdn.microsoft.com/en-us/library/17w5ykft.aspx

withPrefix s a
Signature: s:seq<string> -> a:Arguments -> Arguments

Append the given arguments before all current arguments