diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cdfb2f..429b941 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to `goto` will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [2.0.0] - 2020-01-27 + +### Changed +- Default to $XDG_CONFIG_HOME for storing the goto DB + ## [1.2.4.1] - 2019-06-02 ### Fixed diff --git a/README.md b/README.md index 474ebc1..484de4e 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ echo -e "\$include /etc/inputrc\nset colored-completion-prefix on" >> ~/.inputrc * [Push before changing directories](#push-before-changing-directories) * [Revert to a pushed directory](#revert-to-a-pushed-directory) * [Troubleshooting](#troubleshooting) + * [Updating from 1.x to 2.x](#updating-from-1-x-to-2-x) * [zsh](#zsh) * [command not found compdef](#command-not-found-compdef) @@ -238,6 +239,14 @@ This command is equivalent to `popd`, but within the `goto` command. ## Troubleshooting +### Updating from 1.x to 2.x + +From version **2.x and after**, the `goto` DB file is located in the `$XDG_CONFIG_HOME` or in the `~/.config` directory under the name `goto`. + +If you updated from version **1.x** to **2.x or newer**, you need to move this file which was previously located at `~/.goto`. + +*Note that the new file is not hidden, it does not start with a dot `.`* + ### zsh #### command not found: compdef diff --git a/goto.sh b/goto.sh index 3ec3f6a..bdb53fb 100644 --- a/goto.sh +++ b/goto.sh @@ -75,7 +75,7 @@ goto() _goto_resolve_db() { - local CONFIG_DEFAULT="${XDG_CONFIG_HOME:-$HOME/.config/goto}" + local CONFIG_DEFAULT="${XDG_CONFIG_HOME:-$HOME/.config}/goto" GOTO_DB="${GOTO_DB:-$CONFIG_DEFAULT}" touch -a "$GOTO_DB" } @@ -113,7 +113,7 @@ USAGE # Displays version _goto_version() { - echo "goto version 1.2.4.1" + echo "goto version 2.0.0" } # Expands directory.