Skip to content

Commit 109f94e

Browse files
authored
fix: E79 error on fish shell (#2)
* basename not support in fish, call it from bash instead * fix README error
1 parent 128e051 commit 109f94e

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ A minimal neovim plugin for taking down notes for git projects and per branch
55
![gitpad.nvim screenshot](https://github.com/yujinyuz/gitpad.nvim/assets/10972027/516838f5-9e14-4177-9abc-6f71a4b7feac)
66

77
## ✨ Features
8+
89
- Provides a per repository / per branch way of note taking while working on your code with the help
9-
of floating windows.
10+
of floating windows.
1011
- Supports creating and toggling a separate `{branch}-branchpad.md` file for each branch,
1112
if desired.
1213
- Extensible note list (daily notes, per-file notes, etc.)
1314

1415
## ⚡️ Requirements
16+
1517
- Neovim >= 0.7.2
1618

1719
Disclaimer: Plugin should work fine with most neovim versions but I have not tested yet
@@ -25,11 +27,12 @@ using [lazy.nvim](https://github.com/folke/lazy.nvim):
2527
{
2628
'yujinyuz/gitpad.nvim',
2729
config = function()
28-
require('gitpad').setup {
30+
require('gitpad').setup({
2931
-- your configuration comes here
3032
-- or leave it empty to use the default settings
3133
-- refer to the configuration section below
32-
},
34+
})
35+
end,
3336
keys = {
3437
{
3538
'<leader>pp',
@@ -50,7 +53,7 @@ using [lazy.nvim](https://github.com/folke/lazy.nvim):
5053
'<leader>pd',
5154
function()
5255
local date_filename = 'daily-' .. os.date('%Y-%m-%d.md')
53-
require('gitpad').toggle_gitpad { filename = date_filename }
56+
require('gitpad').toggle_gitpad({ filename = date_filename })
5457
end,
5558
desc = 'gitpad daily notes',
5659
},
@@ -64,13 +67,13 @@ using [lazy.nvim](https://github.com/folke/lazy.nvim):
6467
return
6568
end
6669
filename = vim.fn.pathshorten(filename, 2) .. '.md'
67-
require('gitpad').toggle_gitpad { filename = filename }
70+
require('gitpad').toggle_gitpad({ filename = filename })
6871
end,
6972
desc = 'gitpad per file notes',
7073
},
7174
},
72-
end
7375
}
76+
7477
```
7578

7679
## ⚙︎ Configuration
@@ -106,4 +109,5 @@ require('gitpad').toggle_gitpad_branch()
106109
```
107110

108111
## License
112+
109113
This plugin is distributed under the terms of the MIT License.

lua/gitpad/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function M.init_gitpad_file(opts)
5151
end
5252

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

5757
-- create the notes directory if it doesn't exist

0 commit comments

Comments
 (0)