Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rush ls as an alias to rush list #74

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/rush-list.1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
.PP
Show packages in one or all repositories.
.IP \[bu] 2
Alias: \f[B]l\f[R]
Alias: \f[B]l, ls\f[R]
.SH ARGUMENTS
.SS REPO_OR_PACKAGE
.PP
Expand Down
2 changes: 1 addition & 1 deletion doc/rush-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ DESCRIPTION

Show packages in one or all repositories.

- Alias: **l**
- Alias: **l, ls**

ARGUMENTS
==================================================
Expand Down
10 changes: 7 additions & 3 deletions rush
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ rush_list_usage() {

fi

printf "Alias: l\n"
printf "Alias: l, ls\n"
echo

printf "%s\n" "$(bold "Usage:")"
Expand Down Expand Up @@ -1305,6 +1305,10 @@ send_completions() {
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "$(rush list -s -a) --clone --force --help --verbose -c -f -h -v")" -- "$cur" )'
echo $' ;;'
echo $''
echo $' \'ls\'*)'
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "--all --help --simple -a -h -s")" -- "$cur" )'
echo $' ;;'
echo $''
echo $' \'a\'*)'
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -W "$(_rush_completions_filter "--help -h")" -- "$cur" )'
echo $' ;;'
Expand Down Expand Up @@ -1346,7 +1350,7 @@ send_completions() {
echo $' ;;'
echo $''
echo $' *)'
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "$(rush list -s -a) --help --version -h -v a add c clone completions config copy default download e edit g get i info l list p pull push r remove s search show snatch u undo update upload")" -- "$cur" )'
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "$(rush list -s -a) --help --version -h -v a add c clone completions config copy default download e edit g get i info l list ls p pull push r remove s search show snatch u undo update upload")" -- "$cur" )'
echo $' ;;'
echo $''
echo $' esac'
Expand Down Expand Up @@ -2089,7 +2093,7 @@ parse_requirements() {
shift $#
;;

list | l)
list | l | ls)
action="list"
shift
rush_list_parse_requirements "$@"
Expand Down
2 changes: 1 addition & 1 deletion setup
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ initialize() {

repo="$1"
repo_url="https://github.com/${repo}.git"
pushd $(mktemp -d) > /dev/null
pushd "$(mktemp -d)" >/dev/null
}

section "Initializing"
Expand Down
4 changes: 1 addition & 3 deletions src/bashly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version: 0.7.11
completions: [$(rush list -s -a)]

x_mandoc_authors: Danny Ben Shitrit <https://github.com/dannyben>

x_mandoc_footer: |-
# SOURCE CODE

Expand All @@ -14,7 +13,6 @@ x_mandoc_footer: |-

https://github.com/dannyben/rush-cli/issues


environment_variables:
- name: rush_config
help: |-
Expand Down Expand Up @@ -335,7 +333,7 @@ commands:
- rush info centos:ruby

- name: list
alias: l
alias: [l, ls]
group: Package
help: Show packages in one or all repositories.

Expand Down
6 changes: 5 additions & 1 deletion src/lib/send_completions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ send_completions() {
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "$(rush list -s -a) --clone --force --help --verbose -c -f -h -v")" -- "$cur" )'
echo $' ;;'
echo $''
echo $' \'ls\'*)'
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "--all --help --simple -a -h -s")" -- "$cur" )'
echo $' ;;'
echo $''
echo $' \'a\'*)'
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -W "$(_rush_completions_filter "--help -h")" -- "$cur" )'
echo $' ;;'
Expand Down Expand Up @@ -151,7 +155,7 @@ send_completions() {
echo $' ;;'
echo $''
echo $' *)'
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "$(rush list -s -a) --help --version -h -v a add c clone completions config copy default download e edit g get i info l list p pull push r remove s search show snatch u undo update upload")" -- "$cur" )'
echo $' while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "$(rush list -s -a) --help --version -h -v a add c clone completions config copy default download e edit g get i info l list ls p pull push r remove s search show snatch u undo update upload")" -- "$cur" )'
echo $' ;;'
echo $''
echo $' esac'
Expand Down
6 changes: 5 additions & 1 deletion test/approvals/rush_completions
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ _rush_completions() {
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "$(rush list -s -a) --clone --force --help --verbose -c -f -h -v")" -- "$cur" )
;;

'ls'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "--all --help --simple -a -h -s")" -- "$cur" )
;;

'a'*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -A directory -W "$(_rush_completions_filter "--help -h")" -- "$cur" )
;;
Expand Down Expand Up @@ -149,7 +153,7 @@ _rush_completions() {
;;

*)
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "$(rush list -s -a) --help --version -h -v a add c clone completions config copy default download e edit g get i info l list p pull push r remove s search show snatch u undo update upload")" -- "$cur" )
while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "$(_rush_completions_filter "$(rush list -s -a) --help --version -h -v a add c clone completions config copy default download e edit g get i info l list ls p pull push r remove s search show snatch u undo update upload")" -- "$cur" )
;;

esac
Expand Down
2 changes: 1 addition & 1 deletion test/approvals/rush_list_h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rush list - Show packages in one or all repositories.

Alias: l
Alias: l, ls

Usage:
rush list [REPO_OR_PACKAGE] [OPTIONS]
Expand Down