This commit is contained in:
FireFragment 2023-07-30 18:17:10 -07:00 committed by GitHub
commit 388cfc96ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -210,6 +210,7 @@ following rules are enabled by default:
* `cd_cs` – changes `cs` to `cd`;
* `cd_mkdir` – creates directories before cd'ing into them;
* `cd_parent` – changes `cd..` to `cd ..`;
* `cd_quotes` – adds quotes around directories with spaces in filenames when cd'ing into them;
* `chmod_x` – add execution bit;
* `choco_install` – append common suffixes for chocolatey packages;
* `composer_not_command` – fixes composer command name;

View File

@ -0,0 +1,10 @@
def match(command):
return command.script_parts[0] == "cd" and command.script.count(" ") > 1 and (not("\"" in command.script))
def get_new_command(command):
return 'cd \"{}\"'.format(' '.join(command.script_parts[1:]))
enabled_by_default = True
priority = 900
requires_output = False