GOTO — goto-init

GOTO is a cd alternative that acts like a database of bookmarks to different places in the directory tree. This is the init program for goto.

Table of Contents

NAME

goto-init.raku

AUTHOR

Francis Grizzly Smit ([email protected])

VERSION

v0.1.71

COPYRIGHT

LGPL V3.0+ LICENSE

Top of Document

Introduction

This is the init program for GOTO is a mixture of a Raku app path.raku and a module Paths.rakumod that implements it and a set of script to apply them inside a shell instance This is important as you need the scripts to call cd from within the shell process in order to actually change it's current directory otherwise we would only change a subprocesses current directory and then nothing would have been achieved on exit. The scripts are .goto_bash_aliases -> /home/grizzlysmit/Projects/elvish/gzz-goto/bash_aliases in bash and the combination of some lines in your rc.elv file and a elevish module gt.elv.

See gzz-goto/gt.

SC2120

function eb(){ if type exa >> /dev/null 2>&1 then exa -F -laahigHb --color-scale --time-style=full-iso --icons=always "$@" else ls -Flaghi --color "$@" fi }

SC2119

eb else arg=$(command goto "$1") if [ -z "$arg" ] then if [ -d "$1" ] then cd "$1" eb else echo "error: $1 not found" fi else cd "$arg" # shellcheck disable=SC2119 eb fi fi;; *) command goto "$@";; esac }

SC2119

eb else arg=$(command goto "$1") if [ -z "$arg" ] then if [ -d "$1" ] then cd "$1" eb else echo "error: $1 not found" fi else cd "$arg" # shellcheck disable=SC2119 eb fi fi;; *) command goto "$@";; esac } ENDBASH

GOTO v0.1.71

GOTO is a mixture of a Raku app path.raku and a module Paths.rakumod (implemented separately) that implements it and a set of scripts to apply them inside a shell instance This is important as you need the scripts to call cd from within the shell process in order to actually change it's current directory otherwise we would only change a subprocesses current directory and then nothing would have been achieved on exit. The scripts are applied by running goto-init init [--shell=SHELL] [--config=CONFIG-FILE]. run ```bash goto init --shell=SHELL --config=CONFIGFILE ``` Where - `--shell=SHELL` defaults to bash and - `--config=CONFIG` defults to ~/.bashrc for bash and either ~/.local/share/elvish/rc.elv or $XDG_DATA_HOME/elvish/rc.elv if XDG_DATA_HOME is set in your environment *NB: no other shells are supported at this time.*

Authors

  • Francis Grizzly Smit

License

GPL-3.0-or-later

Dependencies

Terminal::ANSITerminal::WCWidthTerminal::WidthGzz::Text::UtilsSyntax::HighlightersGUI::EditorsDisplay::ListingsFile::UtilsTerminal::ANSIECMA262RegexGzz::Paths

Test Dependencies

Provides

    The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

    Built with Podlite — the markup and publishing tools behind this site.