Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added `bm tags` command

  • Loading branch information...
commit adf123b6da1f8ffc7937f494bb2b521f6ff4ef0b 1 parent 73f66e4
TJ Holowaychuk authored

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. 7  bin/bm
7  bin/bm
@@ -139,7 +139,7 @@ open_bookmark() {
139 139
 
140 140
 show_statistics() {
141 141
   local total_bookmarks=$(cat $BOOKMARKS | wc -l | sed 's/^ *//')
142  
-  local total_tags=$(tags | wc -l | sed 's/^ *//')
  142
+  local total_tags=$(list_tags | wc -l | sed 's/^ *//')
143 143
 
144 144
   echo
145 145
   echo "    total bookmarks: $total_bookmarks"
@@ -152,7 +152,7 @@ show_statistics() {
152 152
 # Output tags.
153 153
 #
154 154
 
155  
-tags() {
  155
+list_tags() {
156 156
   cat $BOOKMARKS \
157 157
     | cut -f3 -d '|' \
158 158
     | tr " " "\n" \
@@ -168,7 +168,7 @@ tags() {
168 168
 display_top_ten_tags() {
169 169
   echo
170 170
   printf "%20s  %s\n" count tag
171  
-  tags \
  171
+  list_tags \
172 172
     | head -10 \
173 173
     | awk '{ printf("%20d  %s\n", $1, $2) }'
174 174
 }
@@ -343,6 +343,7 @@ while test $# -ne 0; do
343 343
   case $arg in
344 344
     -V|--version) echo $VERSION; exit ;;
345 345
     -h|--help) usage; exit ;;
  346
+    tags) list_tags; exit ;;
346 347
     ls|list) list_bookmarks; exit ;;
347 348
     search) search_bookmarks "$@"; exit ;;
348 349
     open) open_bookmark "$@"; exit ;;

0 notes on commit adf123b

Please sign in to comment.
Something went wrong with that request. Please try again.