Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit fef9051

Browse files
committed
updating list and cargo lock
1 parent 59fb5bd commit fef9051

File tree

3 files changed

+26
-23
lines changed

3 files changed

+26
-23
lines changed

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cli.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ subcommands:
1818
- list:
1919
about: list all of the directories managed by global git
2020
args:
21-
- list-dirs:
22-
short: l
23-
long: list-dirs
24-
help: also gives the directories of git repos
21+
- plain:
22+
short: p
23+
long: plain
24+
help: lists just the projects by name with no directories
2525
takes_value: false
2626
- add:
2727
about: Add a directory to the list maintained by global-git

src/subcommands.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,14 @@ pub fn pull(matches: ArgMatches, settings_file: SettingsFile) {
7070

7171
pub fn list(matches: ArgMatches, settings_file: SettingsFile) {
7272
let repos = settings_file.list_repos();
73-
let dirs_flag = matches.subcommand_matches("list")
74-
.unwrap().is_present("list-dirs");
73+
let plain_flag = matches.subcommand_matches("list")
74+
.unwrap().is_present("plain");
7575
for member in repos.members() {
76-
if dirs_flag {
77-
println!("name: {}\npath: {}\n", member["name"].to_string(), member["path"].to_string());
76+
if ! plain_flag {
77+
println!("{} -> {}",
78+
member["name"].to_string(),
79+
member["path"].to_string()
80+
);
7881
} else {
7982
println!("{}", member["name"].to_string());
8083
}

0 commit comments

Comments
 (0)