Added Syntax Highlighting for nftables-firewall config file
Created nftables syntax highlighting
Sorry, I do not know much about nftables syntax and syntax highlighting so I cannot review much. There is nothing else I can properly suggest but the header pattern is still at least not changed.
Oh sorry, i didn`t see the "suggested change". I thought it had already been changed.
Sorry, I do not know much about nftables syntax and syntax highlighting so I cannot review much. There is nothing else I can properly suggest but the header pattern is still at least not changed.
Can someone else check the code? Or can you merge it simply?
Can someone else check the code? Or can you merge it simply?
I cannot merge pull requests but I tried reviewing again. I do not know much about syntax highlighting so I think it is better if another person reviews a bit. I think not adding all expressions and merging may be fine for now.
I looked at nft(8) manpage as a reference but I think reading it may be confusing when not looking at the wiki first.
It may look weird if groups in IPv6 addresses with hex digits are not highlighted but integers can be highlighted using this rule:
- constant.number: "\\b([1-9][0-9]*|0[0-7]*|0[Xx][0-9A-Fa-f]+)\\b"There is a lot of expressions in nftables but the keywords suggested are usually used so it may be fine highlighting them only for now.
i think we must not check everything at the first time. there is also a tool called nft. with the command nft -c -f <path to file> you can check the nftables syntax before you restart the service. this will prompt you if there is an error in your config file.
A git client will have to be used, but can you please squash the commits into one and amend on the latest commit after editing the file?
A git client will have to be used, but can you please squash the commits into one and amend on the latest commit after editing the file?
Oh sorry i didn`t used a git client. I have accepted your suggestions. I saw your message little bit to late.
I am sorry that I did not respond early weeks ago too. I think the file is fine now, but I do not know if the pull request will be merged if the commits are not squashed.
I am sorry that I did not respond early weeks ago too. I think the file is fine now, but I do not know if the pull request will be merged if the commits are not squashed.
I don't know if i can Squash the commits.
It is late here (3 AM) so I cannot assist much but something like these can be done:
sudo apt install git openssh-client
ssh-keygen -t ed25519 -f ~/.ssh/id_github
# open https://github.com/settings/keys in browser
# copy ~/.ssh/id_github.pub (not id_github) content and add key
exec ssh-agent bash
ssh-add ~/.ssh/id_github
git clone ssh://[email protected]/theredcmdcraft/micro.git
# reset to commit before first commit in this pull request
git reset --soft dfd3df5~1
# write commit message then save
# message can be just something like "Add nftables syntax highlighting"
git commit
git push -u origin master
There are still other pages about squashing you can read but this is what I would do.
It is late here (3 AM) so I cannot assist much but something like these can be done:
sudo apt install git openssh-client ssh-keygen -t ed25519 -f ~/.ssh/id_github # open https://github.com/settings/keys in browser # copy ~/.ssh/id_github.pub (not id_github) content and add key exec ssh-agent bash ssh-add ~/.ssh/id_github git clone ssh://[email protected]/theredcmdcraft/micro.git # reset to commit before first commit in this pull request git reset --soft dfd3df5~1 # write commit message then save # message can be just something like "Add nftables syntax highlighting" git commit git push -u origin masterThere are still other pages about squashing you can read but this is what I would do.
I tried my best. Please have a look if this is correct. I hope you`re fine now.
I am really sorry, it was not a good idea replying at 3 AM and I did not include --force in git push. I tested this with your branch on a private repository, but please try running these if possible:
exec ssh-agent bash
ssh-add ~/.ssh/id_github
# reset to first commit in pull request
git reset --soft dfd3df52
# save only
git commit --amend --date=now
git push --force -u origin master
I am really sorry, it was not a good idea replying at 3 AM and I did not include
--forceingit push. I tested this with your branch on a private repository, but please try running these if possible:exec ssh-agent bash ssh-add ~/.ssh/id_github # reset to first commit in pull request git reset --soft dfd3df52 # save only git commit --amend --date=now git push --force -u origin master
Sorry for the realy late reply. In last weeks there was a lot of stuff that i had to do. So hopefully now it sould be correctly squashed.
Do you can merge it?