All Projects → 0mp → Goat

0mp / Goat

Licence: other
POSIX-compliant shell movement boosting hack for real ninjas (aka `cd x` and `cd ...`)

Programming Languages

shell
77523 projects
bash
514 projects
hack
652 projects

Projects that are alternatives of or similar to Goat

Synth Shell
Boost your terminal, script by script
Stars: ✭ 217 (+703.7%)
Mutual labels:  productivity, utility, terminal
vscode-snippet-generator
📜 Generate snippets from code in VSCode
Stars: ✭ 31 (+14.81%)
Mutual labels:  productivity, utility
smoosh
The Symbolic, Mechanized, Observable, Operational SHell: an executable formalization of the POSIX shell standard.
Stars: ✭ 86 (+218.52%)
Mutual labels:  posix, sh
Stup
Daily notes in the terminal 🐧
Stars: ✭ 340 (+1159.26%)
Mutual labels:  productivity, terminal
goto
Goto - The Good Way to Program
Stars: ✭ 14 (-48.15%)
Mutual labels:  utility, cd
vscode-jump
🏃‍♂️ Jump/Select to the Start/End of a word in VSCode
Stars: ✭ 67 (+148.15%)
Mutual labels:  productivity, utility
Haxor News
Browse Hacker News like a haxor: A Hacker News command line interface (CLI).
Stars: ✭ 3,342 (+12277.78%)
Mutual labels:  utility, terminal
flawesome
Productivity Tool
Stars: ✭ 56 (+107.41%)
Mutual labels:  productivity, utility
Saws
A supercharged AWS command line interface (CLI).
Stars: ✭ 4,886 (+17996.3%)
Mutual labels:  utility, terminal
Modernish
Modernish is a library for writing robust, portable, readable, and powerful programs for POSIX-based shells and utilities.
Stars: ✭ 586 (+2070.37%)
Mutual labels:  sh, posix
Goto
Alias and navigate to directories with tab completion in Linux
Stars: ✭ 698 (+2485.19%)
Mutual labels:  productivity, utility
scr
🎤 A Super CRappy SCReenshot & SCreen Recording SCRipt for Sound Cloud Rappers + audio recorder, yes (sponsored by https://git.io/kiwmi)
Stars: ✭ 16 (-40.74%)
Mutual labels:  posix, sh
bat
Battery management utility for Linux laptops.
Stars: ✭ 107 (+296.3%)
Mutual labels:  utility, sh
powerlet
⚡️ Chrome Extension to quickly find and run bookmarklets
Stars: ✭ 17 (-37.04%)
Mutual labels:  productivity, utility
pino-caller
🌲 Include call site of pino log messages
Stars: ✭ 35 (+29.63%)
Mutual labels:  productivity, utility
Eureka
💡 CLI tool to input and store your ideas without leaving the terminal
Stars: ✭ 316 (+1070.37%)
Mutual labels:  productivity, terminal
Slowquitapps
Add a global delay to Command-Q to stop accidental app quits.
Stars: ✭ 916 (+3292.59%)
Mutual labels:  productivity, utility
linearmouse
🖱 The mouse and trackpad utility for Mac.
Stars: ✭ 1,151 (+4162.96%)
Mutual labels:  productivity, utility
DropPoint
Make drag-and-drop easier using DropPoint. Drag content without having to open side-by-side windows
Stars: ✭ 303 (+1022.22%)
Mutual labels:  productivity, utility
Mrsh
A minimal POSIX shell
Stars: ✭ 381 (+1311.11%)
Mutual labels:  sh, posix

goat

Overview

I used to retrieve carefully-constructed cd commands from my history. But then, I got a goat.

~ Jonathan Paugh on Google+

[ ~/Pictures ] $ goat dev ~/Documents/devel # create a link to the dev directory
[ ~/Pictures ] $ ls # see that there is no ~/Pictures/dev directory here
seahorses wallpapers
[ ~/Pictures ] $ cd dev # the goat framework's got you covered!
[ ~/Documents/devel ] $

Oh my! This is a POSIX-compliant shell movement boosting hack for real ninjas.
#posix_me_harder #posixly_correct

~ 0mp

Sometimes you jump around your filesystem tree a lot and you end up putting a couple of ugly aliases into your shell's rc file.

I should try it, even if it is dumb!

~ dse on What the Daily WTF? about goat v1.1.1

With goat you can easily manage your ninja shortcuts - just type goat p ~/Projects to introduce a new link and then cd p to jump to its destination.

Rad! I can do cd .... now instead of performing a horse galloping-like waltz with ../ being my miserable dance floor. I'm cloning this goat straight away!

~ YA0mp

BTW, Bash completion is now fully working with goat's shortcuts.

Installation

$ make install

Aferwards:

  • Make sure that ~/.local/bin is in your PATH:

    $ cat <<'EOF' >> ~/.bashrc
    case "$PATH" in
        *$HOME/.local/bin*) ;;
        *) PATH="$HOME/.local/bin:$PATH" ;;
    esac
    EOF
    
  • Make sure that files inside ~/.local/etc/bash_completion.d are actually sourced by the Bash completion library:

    $ cat <<'EOF' >> ~/.bash_completion
    if [[ -d ~/.bash_completion.d ]]
    then
        for f in ~/.local/etc/bash_completion.d/*
        do
            [[ -f $f ]] && source "$f"
        done
    fi
    EOF
    

Usage overview

Create a shortcut named “f” to ~/Documents/dev/freebsd (no need to use
the link command explicitly here):

      $ goat f ~/Documents/dev/freebsd

Follow a link to change a directory with cd(1):

      $ cd f

Take the “f” shortcut and enter its destination subdirectory with just
one command:

      $ pwd
      /home/0mp
      $ cd f/ports
      $ pwd
      /usr/home/0mp/freebsd/ports

Create a shortcut named “p” to the current directory:

      $ goat p .

Go up the filesystem tree with ... (same as the standard “cd ../../”):

      $ cd ...

List all your links:

      $ goat list
      dots    ->      /usr/home/0mp/.dotfiles
      down    ->      /usr/home/0mp/Downloads
      f       ->      /usr/home/0mp/freebsd
      p       ->      /usr/home/0mp/freebsd/ports
      pa      ->      /usr/home/0mp/freebsd/patches
      src     ->      /usr/home/0mp/freebsd/svn/src
      svn     ->      /usr/home/0mp/freebsd/svn

Delete a link (or more):

      $ goat delete f p

Delete all the links which point to directories with the given prefix:

      $ goat deleteprefix "$HOME/Documents"

License

Licensed under BSD license. Copyright © 2016-2018 Mateusz Piotrowski

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].