Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Latest commit

 

History

History
66 lines (48 loc) · 1.3 KB

cli-bookmarks.adoc

File metadata and controls

66 lines (48 loc) · 1.3 KB

cli-bookmarks(1) Manual Page

NAME

cli-bookmarks - CLI Filesystem Directory Bookmarks

SYNOPSIS

# Show the GUI
cb

# Use a bookmark
cb bookmark_alias

# Use a bookmark and navigate its subdirectories
cb bookmark_alias <tab>

Bookmarks are stored in the ~/.cli-bookmarks.toml file.

Setup

Add the following to your bash setup:

function cb() {
  local out=""
  local exit_value=1
  if [[ $# -eq 0 ]]; then
    out=`cli-bookmarks`
    exit_value=$?
  else
    out=`cli-bookmarks "$*"`
    exit_value=$?
  fi
  if [[ $exit_value == 0 ]]; then
    cd "$out"
  else
    echo "$out"
  fi
}

function _cliBookmarks() {
  COMPREPLY=(`cli-bookmarks --completion-current ${2} --completion-previous ${3}`)
  return 0
}
complete -o nospace -F _cliBookmarks cb

LICENSE

This file is part of cli-bookmarks.

Copyright © 2018 David Gamba Rios

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.