diff options
author | alex <alex@builder.localdomain> | 2007-12-11 15:12:41 -0800 |
---|---|---|
committer | alex <alex@builder.localdomain> | 2007-12-11 15:12:41 -0800 |
commit | 42aff76b3686beb463a77f3dabd4c5beed961120 (patch) | |
tree | e61062b2c0b55d3841083c38110603f1c398bd06 /etc/bash_completion.d/20vyatta-cfg | |
parent | fb9450551d5757a45806a062d7457a761e6dd295 (diff) | |
parent | 832dbf144bc019ec524e4163b716dd823ee26900 (diff) | |
download | vyatta-cfg-42aff76b3686beb463a77f3dabd4c5beed961120.tar.gz vyatta-cfg-42aff76b3686beb463a77f3dabd4c5beed961120.zip |
Merge branch 'master' of http://phuket.vyatta.com/vyatta-cfg
Diffstat (limited to 'etc/bash_completion.d/20vyatta-cfg')
-rw-r--r-- | etc/bash_completion.d/20vyatta-cfg | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/etc/bash_completion.d/20vyatta-cfg b/etc/bash_completion.d/20vyatta-cfg index fe64f40..dc05cf1 100644 --- a/etc/bash_completion.d/20vyatta-cfg +++ b/etc/bash_completion.d/20vyatta-cfg @@ -54,8 +54,9 @@ show () args[${#args[@]}]="$arg" fi done - eval "${vyatta_sbindir}/vyatta-output-config.pl ${show_all}\ - \${VYATTA_EDIT_LEVEL//\// } ${args[@]}" + ${vyatta_sbindir}/vyatta-output-config.pl ${show_all} \ + ${VYATTA_EDIT_LEVEL//\// } ${args[@]} \ + | eval "${VYATTA_PAGER:-cat}" } save () @@ -705,6 +706,20 @@ vyatta_config_complete () end_space=1 (( num_comp -= 1 )) fi + + # handle pipe + if [ "${COMP_WORDS[$num_comp]}" == "|" ]; then + declare -a hitems=( "more" \ + ) + declare -a hstrs=( \ + "Paginate the output" \ + ) + generate_help_text hitems hstrs + vyatta_completions=( "${hitems[@]}" ) + vyatta_do_complete + return + fi + (( last_idx = num_comp - 1 )) comp_words=( ${COMP_WORDS[@]:1:$num_comp} ) |