Skip to content

Commit

Permalink
fix: E79 error on fish shell (#2)
Browse files Browse the repository at this point in the history
* basename not support in fish, call it from bash instead
* fix README error
  • Loading branch information
krehwell authored May 12, 2024
1 parent 128e051 commit 109f94e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ A minimal neovim plugin for taking down notes for git projects and per branch
![gitpad.nvim screenshot](https://github.com/yujinyuz/gitpad.nvim/assets/10972027/516838f5-9e14-4177-9abc-6f71a4b7feac)

## ✨ Features

- Provides a per repository / per branch way of note taking while working on your code with the help
of floating windows.
of floating windows.
- Supports creating and toggling a separate `{branch}-branchpad.md` file for each branch,
if desired.
- Extensible note list (daily notes, per-file notes, etc.)

## ⚡️ Requirements

- Neovim >= 0.7.2

Disclaimer: Plugin should work fine with most neovim versions but I have not tested yet
Expand All @@ -25,11 +27,12 @@ using [lazy.nvim](https://github.com/folke/lazy.nvim):
{
'yujinyuz/gitpad.nvim',
config = function()
require('gitpad').setup {
require('gitpad').setup({
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
})
end,
keys = {
{
'<leader>pp',
Expand All @@ -50,7 +53,7 @@ using [lazy.nvim](https://github.com/folke/lazy.nvim):
'<leader>pd',
function()
local date_filename = 'daily-' .. os.date('%Y-%m-%d.md')
require('gitpad').toggle_gitpad { filename = date_filename }
require('gitpad').toggle_gitpad({ filename = date_filename })
end,
desc = 'gitpad daily notes',
},
Expand All @@ -64,13 +67,13 @@ using [lazy.nvim](https://github.com/folke/lazy.nvim):
return
end
filename = vim.fn.pathshorten(filename, 2) .. '.md'
require('gitpad').toggle_gitpad { filename = filename }
require('gitpad').toggle_gitpad({ filename = filename })
end,
desc = 'gitpad per file notes',
},
},
end
}

```

## ⚙︎ Configuration
Expand Down Expand Up @@ -106,4 +109,5 @@ require('gitpad').toggle_gitpad_branch()
```

## License

This plugin is distributed under the terms of the MIT License.
2 changes: 1 addition & 1 deletion lua/gitpad/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function M.init_gitpad_file(opts)
end

-- create the repository directory if it doesn't exist
local repository_name = vim.fn.systemlist('basename `git rev-parse --show-toplevel`')[1]
local repository_name = vim.fn.systemlist("bash -c 'basename `git rev-parse --show-toplevel`'")[1]
local notes_dir = vim.fs.normalize(M.config.dir .. '/' .. repository_name)

-- create the notes directory if it doesn't exist
Expand Down

0 comments on commit 109f94e

Please sign in to comment.