mirror of
https://github.com/dongdigua/dongdigua.github.io
synced 2025-02-19 04:59:15 +08:00
gmi: README, new disable_fish_completion
This commit is contained in:
parent
5e2a32ad74
commit
5e7114b3cc
0
gmi/.directory-listing-ok
Normal file
0
gmi/.directory-listing-ok
Normal file
22
gmi/README.gmi
Normal file
22
gmi/README.gmi
Normal file
@ -0,0 +1,22 @@
|
||||
# Gemtext
|
||||
|
||||
## Why?
|
||||
* I like plaintext
|
||||
* gemtext is lightweight
|
||||
* no format conversion, just serve it
|
||||
|
||||
## Linewrap?
|
||||
I usually do not use linewrap when I'm writing, because it makes me clearer
|
||||
and more logical than put everything together, and I like to view text
|
||||
shorter than 2/3 of the screen, and it is easier to nevigate in editor
|
||||
(jump by line instead of jump by word in a long line).
|
||||
When exporting org to html, I add \n:t so the export process will keep my
|
||||
linebreak, so on website it is also not a mess.
|
||||
|
||||
But in gemini, it's recommended to write long lines[1], and such as in elpher client, it wraps line in 79 character, so I need to either write within 80 column, or write long lines and give the linewrap to "leave it up to the receiving Gemini client to wrap your lines to fit the device's screen size and the user's preference"
|
||||
|
||||
I will wrap line freely as I want, neither 80 column rule[2] nor long line.
|
||||
|
||||
|
||||
=> gemini://gemini.circumlunar.space/docs/gemtext.gmi [1]: Gemini Doc
|
||||
=> https://www.emacswiki.org/emacs/EightyColumnRule [2]: EmacsWiki EightyColumnRule
|
27
gmi/disable_fish_gpg_completion.gmi
Normal file
27
gmi/disable_fish_gpg_completion.gmi
Normal file
@ -0,0 +1,27 @@
|
||||
# Disable Fish Shell's GPG Completion
|
||||
2023-05-02 Tue
|
||||
|
||||
Fish's gpg completion is bad, it previously led to my accidentally deletion of
|
||||
my secret key[1]. And as I add more people's key, the completion starts to
|
||||
become too long and is's really nonsense unless you can remenber everyone's key
|
||||
and subkey properly. So I want to disable it (or switch to ksh for daily use?).
|
||||
|
||||
Fish uses its complete(1) to, apparently, do completion.
|
||||
`complete gpg` will print out all the predefined gpg completion,
|
||||
and the keyid completion is the `__fish_complete_gpg_user_id` function.
|
||||
So let's hack it.
|
||||
|
||||
First `complete gpg > gpg.fish` to dump all the `complete ...` so I can edit it with vim.
|
||||
Then I remove all the lines that don't have the __fish_complete_gpg_user_id by `:g!/__fish_complete_gpg_user_id/d`.
|
||||
Then record a macro to add -e at every end of line,
|
||||
but I found that all these command arguments itself such as --export won't show up in completion. So just remove the `-a (__fish_complete_gpg_user_id)`.
|
||||
Then I mv the file to ~/.config/fish/config.fish, only to find the rest of completion that is not redefined by me are lost,
|
||||
add a `__fish_complete_gpg gpg` line on top of those lines don't work either,
|
||||
it will make all the completion come back and my re-definition becomes useless.
|
||||
|
||||
So, just put an empty `~/.config/fish/completions/gpg.fish` is ok...
|
||||
I think those completions will make me less focused, not knowing what exactly I'm doing but just follow the completion.
|
||||
One day my laptop's power was off so I worked on my Fedora server that only have a console. It made me focused.
|
||||
|
||||
|
||||
=> https://dongdigua.github.io/pgp_canokey#obsolete [1]
|
Loading…
Reference in New Issue
Block a user