mirror of
https://github.com/NixOS/nix
synced 2025-07-03 06:11:46 +02:00
Fix nix shebang interaction with #8131 overhaul completions
This commit is contained in:
parent
e91fd837ee
commit
ffd414eb75
4 changed files with 25 additions and 29 deletions
|
@ -29,14 +29,26 @@ struct Completions final : AddCompletions
|
|||
*/
|
||||
class RootArgs : virtual public Args
|
||||
{
|
||||
/**
|
||||
* @brief The command's "working directory", but only set when top level.
|
||||
*
|
||||
* Use getCommandBaseDir() to get the directory regardless of whether this
|
||||
* is a top-level command or subcommand.
|
||||
*
|
||||
* @see getCommandBaseDir()
|
||||
*/
|
||||
Path commandBaseDir = ".";
|
||||
|
||||
public:
|
||||
/** Parse the command line, throwing a UsageError if something goes
|
||||
* wrong.
|
||||
*/
|
||||
void parseCmdline(const Strings & cmdline);
|
||||
void parseCmdline(const Strings & cmdline, bool allowShebang = false);
|
||||
|
||||
std::shared_ptr<Completions> completions;
|
||||
|
||||
Path getCommandBaseDir() const override;
|
||||
|
||||
protected:
|
||||
|
||||
friend class Args;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue