Skip to content

Commit e5d1e3b

Browse files
committed
tools [nfc]: Rename directory, from scripts/
Either name "scripts" or "tools" works well as a description for what this directory contains: scripts we run as development tools. When I first created it with this build-icon-font script, I chose "scripts" for reasons of tab-completion. Specifically, when completing a filename to pass to `git` or `flutter test` or etc., I wanted to preserve for the `test/` directory the privilege of being completable after a single keystroke: "t<TAB>" completes to "test/". After all, that's a directory one wants to talk about all the time. The name "scripts", though, turns out to be quite unfortunate for a different case of tab-completion: when completing a command name. If you want to run `scripts/icons/build-icon-font`, you pretty much have to type out "scripts/" in full. It's competing not only with other files in the tree, but with commands in your PATH; and my PATH has commands "script" and "scriptreplay", as well as commands whose names diverge from "scripts" after "s, "sc", or "scr". That's fine when it's just about `scripts/icons/build-icon-font`, because that's a command one runs only very infrequently. But we're about to add an omnibus run-all-checks script; that'll be used in CI, but I also want it to be convenient to run frequently in local development when iterating on changes, just as we do in zulip-mobile with `tools/test`. To live up to that, I want its name to be as quick and easy to type as possible. And so, `tools/`. Now completing "test/" for a filename will take three keystrokes "te<TAB>" instead of two; but in exchange, this tool-scripts directory will take only four keystrokes "too<TAB>" to get "tools/", even when completing as a command name.
1 parent 349b585 commit e5d1e3b

File tree

6 files changed

+1
-1
lines changed

6 files changed

+1
-1
lines changed

lib/widgets/icons.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ abstract final class ZulipIcons {
1616
// or otherwise edit the SVG files there.
1717
// The files' names (before ".svg") should be valid Dart identifiers.
1818
//
19-
// * Then run the command `scripts/icons/build-icon-font`.
19+
// * Then run the command `tools/icons/build-icon-font`.
2020
// That will update this file and the generated icon font,
2121
// `assets/icons/ZulipIcons.ttf`.
2222
//
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)