Skip to content

Commit 659808a

Browse files
committed
add regression test for private command completions
1 parent c5abe1f commit 659808a

File tree

5 files changed

+47
-0
lines changed

5 files changed

+47
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
+ bundle exec bashly add completions_yaml
2+
created ./completions.yml
3+
4+
This file can be converted to a completions script using the completely gem.
5+
6+
+ cat completions.yml
7+
---
8+
private:
9+
- "--help"
10+
- "--version"
11+
- "-h"
12+
- "-v"
13+
- c
14+
- connect
15+
private connect:
16+
- "--help"
17+
- "-h"
18+
private c:
19+
- "--help"
20+
- "-h"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
completions.yml
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This fixture tests that private commands are not added to the generated
2+
completions scripts.
3+
4+
Reference issue: https://github.com/DannyBen/bashly/issues/388
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: private
2+
help: Test private commands
3+
4+
commands:
5+
- name: connect
6+
alias: c
7+
help: Connect to the metaverse
8+
- name: connect-ftp
9+
help: Connect via FTP
10+
alias: cf
11+
private: true
12+
- name: connect-ssh
13+
help: Connect via SSH
14+
alias: cs
15+
private: true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
rm -f ./completions.yml
4+
5+
set -x
6+
bundle exec bashly add completions_yaml
7+
cat completions.yml

0 commit comments

Comments
 (0)