Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support $XDG_CONFIG_HOME #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

erikw
Copy link

@erikw erikw commented Nov 4, 2021

Backwards compatible change that supports storing the bookmarks in
$XDG_CONFIG_HOME/cd-bookmarks.

  1. If the user as set the previously existing $CD_BOOKMARK_FILE, this is always overriding.
  2. If the user has created/moved the directory/file $XDG_CONFIG_HOME/cd-bookmarks/(bookmarks), use this
  3. Else fall back to old default $HOME/.cdbookmark

Thus $XDG_CONFIG_HOME is opt-in for those who want. This logic can be changed in a couple of releases to migrate away from $HOME/.cdbookmark.

Tested on zsh 5.8 on macOS.

Fixes #3

@erikw erikw force-pushed the feature/3/xdg_spec branch from 20fe917 to d75c193 Compare November 4, 2021 11:04
erikw added a commit to erikw/cd-bookmark that referenced this pull request Nov 4, 2021
The missing piece for this shell program: easily delete bookmarkas as
well without having to being faced with all bookmarks with the -e edit
command. When one know the BOOKMARK_ID, it should be as easy as

$ cd-bookmark -d BOOKMAK_ID

to remove it!

Fixes mollifier#5
@erikw erikw mentioned this pull request Nov 4, 2021
Backwards compatible change that supports storing the bookmarks in
$XDG_CONFIG_HOME/cd-bookmarks.

* If the user as set the previously
existing $CD_BOOKMARK_FILE, this is always overriding.
* If the user has created the directory/file
  $XDG_CONFIG_HOME/cd-bookmarks/(bookmarks), use this
* Else fall back to old default $HOME/.cdbookmark

Fixes mollifier#3
@erikw erikw force-pushed the feature/3/xdg_spec branch from d75c193 to fff0479 Compare November 4, 2021 11:55
erikw added a commit to erikw/cd-bookmark that referenced this pull request Nov 4, 2021
The missing piece for this shell program: easily delete bookmarkas as
well without having to being faced with all bookmarks with the -e edit
command. When one know the BOOKMARK_ID, it should be as easy as

$ cd-bookmark -d BOOKMAK_ID

to remove it!

Fixes mollifier#5
erikw added a commit to erikw/cd-bookmark that referenced this pull request Nov 4, 2021
The missing piece for this shell program: easily delete bookmarkas as
well without having to being faced with all bookmarks with the -e edit
command. When one know the BOOKMARK_ID, it should be as easy as

$ cd-bookmark -d BOOKMAK_ID

to remove it!

Fixes mollifier#5
erikw added a commit to erikw/cd-bookmark that referenced this pull request Nov 4, 2021
The missing piece for this shell program: easily delete bookmarkas as
well without having to being faced with all bookmarks with the -e edit
command. When one know the BOOKMARK_ID, it should be as easy as

$ cd-bookmark -d BOOKMAK_ID

to remove it!

Fixes mollifier#5
erikw added a commit to erikw/cd-bookmark that referenced this pull request Nov 4, 2021
The missing piece for this shell program: easily delete bookmarkas as
well without having to being faced with all bookmarks with the -e edit
command. When one know the BOOKMARK_ID, it should be as easy as

$ cd-bookmark -d BOOKMAK_ID

to remove it!

Fixes mollifier#5
erikw added a commit to erikw/cd-bookmark that referenced this pull request Nov 4, 2021
The missing piece for this shell program: easily delete bookmarkas as
well without having to being faced with all bookmarks with the -e edit
command. When one know the BOOKMARK_ID, it should be as easy as

$ cd-bookmark -d BOOKMAK_ID

to remove it!

Fixes mollifier#5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support XDG Base Directory Specification
1 participant