diff options
author | 2009-11-06 18:00:33 +0000 | |
---|---|---|
committer | 2009-11-06 18:00:33 +0000 | |
commit | 0c92c83f32030905fadb4173263a08e22c8ef60e (patch) | |
tree | 793e512625617ecf1b3f1a697542cebc8ce1a9f5 | |
parent | Tiny syntax tweak in testing for empty array. (diff) | |
download | emacs-tools-0c92c83f32030905fadb4173263a08e22c8ef60e.tar.gz emacs-tools-0c92c83f32030905fadb4173263a08e22c8ef60e.tar.bz2 emacs-tools-0c92c83f32030905fadb4173263a08e22c8ef60e.zip |
Support brief output mode, bug 292100.
svn path=/eselect-emacs/; revision=1449
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ctags.eselect | 18 | ||||
-rw-r--r-- | emacs.eselect | 32 |
3 files changed, 29 insertions, 26 deletions
@@ -1,3 +1,8 @@ +2009-11-06 Ulrich Mueller <ulm@gentoo.org> + + * emacs.eselect (do_list, do_show): + * ctags.eselect (do_list): Support brief output mode, bug 292100. + 2009-05-07 Ulrich Mueller <ulm@gentoo.org> * Version 1.10 released. diff --git a/ctags.eselect b/ctags.eselect index 4a13c79..e61709e 100644 --- a/ctags.eselect +++ b/ctags.eselect @@ -144,18 +144,14 @@ do_list() { local i targets targets=( $(find_targets) ) + for (( i = 0; i < ${#targets[@]}; i++ )); do + # Highlight the currently chosen version + [[ ${targets[i]} = \ + $(basename "$(readlink "${ROOT}${bindir}/${CTAGS}")") ]] \ + && targets[i]=$(highlight_marker "${targets[i]}") + done write_list_start "Available ${CTAGS} symlink targets:" - if [[ ${#targets[@]} -gt 0 ]]; then - for (( i = 0; i < ${#targets[@]}; i++ )); do - # Display a star to indicate the currently chosen version - [[ ${targets[i]} = \ - $(basename "$(readlink "${ROOT}${bindir}/${CTAGS}")") ]] \ - && targets[i]="${targets[i]} $(highlight '*')" - done - write_numbered_list "${targets[@]}" - else - write_kv_list_entry "(none found)" "" - fi + write_numbered_list -m "(none found)" "${targets[@]}" } ### set action ### diff --git a/emacs.eselect b/emacs.eselect index 1e9a3b3..b51a109 100644 --- a/emacs.eselect +++ b/emacs.eselect @@ -170,8 +170,11 @@ do_show() { else write_kv_list_entry "(unset)" "" fi - xemacs_info - #vim_info + + #if ! is_output_mode brief; then + xemacs_info + #vim_info + #fi } ### list action ### @@ -186,20 +189,19 @@ do_list() { local i targets targets=( $(find_targets) ) + for (( i = 0; i < ${#targets[@]}; i++ )); do + # Highlight the currently chosen version + [[ ${targets[i]} = \ + $(basename "$(readlink "${ROOT}${bindir}/emacs")") ]] \ + && targets[i]=$(highlight_marker "${targets[i]}") + done write_list_start "Available Emacs symlink targets:" - if [[ ${#targets[@]} -gt 0 ]]; then - for (( i = 0; i < ${#targets[@]}; i++ )); do - # Display a star to indicate the currently chosen version - [[ ${targets[i]} = \ - $(basename "$(readlink "${ROOT}${bindir}/emacs")") ]] \ - && targets[i]="${targets[i]} $(highlight '*')" - done - write_numbered_list "${targets[@]}" - else - write_kv_list_entry "(none found)" "" - fi - xemacs_info - #vim_info + write_numbered_list -m "(none found)" "${targets[@]}" + + #if ! is_output_mode brief; then + xemacs_info + #vim_info + #fi } ### set action ### |