Currently still a work in progress.
the bin/.bin/openapi file will be a bash script for interfacing with an
openapi file. Currently it does things like listing requests, servers,
and viewing a request in json format.
The function added to fzf.zsh adds a zsh widget so that I can press a
keybinding (in my case ^o) to complete the command. It uses the above
script and fzf to make the selection. Currently supports http / https /
curl
The widget looks for an environment variable called OPENAPI which should
point to the openapi file. This is set in zshrc if a project is set.
Heavily inspired by this: https://dev.to/frost/fish-style-abbreviations-in-zsh-40aa
When space is pushed, zsh will try to expand any aliases that I have put
in the array in this file.
It is currently quite basic, only looking at the first word on the
command line.
I have added a default binging of ctrl+/ to toggle the preview in fzf
I have added some git key bindings for git stuff. They are all in the
form with ctrl+g ctrl+<something>. Most are what they want, for example
branches are ctrl+g ctrl+b however commits are not. I assume this is
because I can't overwrite what ctrl+c does, even if prefixed. I will
look into this at some point but for now commits are ctrl+g ctrl+h.
Largely stolen the code from here:
https://gist.github.com/junegunn/8b572b8d4b5eddd8b85e5f4d40f17236
although with minor tweaks.
I might change the initial ctrl+g binding as it is awkward on colemak
although we'll see how often I use it.
The main args completion no longer uses a bash while loop for splitting
up the arguments making it much faster.
I have also removed the use of FZF for looking up modes. This has been
moved into the overidepartialcompletion file in includes.
This is useful if I want to edit a script but I'm not in my scripts
directory. It will look for a file with the name I have typed and
replace it.
for example:
vim yt<^n>
will be replaced with
vim /home/jonathan/.bin/yt
The script will first try `which <filename>`, searching the path. If
that fails, it will do `locate "*/filename"` which will search for the
file elsewhere
The alt-m key binding is used to create a directory for the current
"word". This change makes it work if it has something like ~ in the
name.
${~var} is used to turn on GLOB_SUBST. The string resulting from the
expansion will be interpreted as a pattern anywhere that is possible,
such as filenames expanding `~`
man zshexpn
When tabcompleting for pacman -R*, I generally only want to show things
that I've explicitly installed, rather than things that have been
installed automatically as a dependency.
This is mainly achieved by no longer showing the full path.
If the terminal is less than 100 characters, it will show a preceding
icon, >> then the bottom most folder name.
The >> indicates that folders have been missed.
I have added an icon for my dotfiles folder
I have added an environment variable to make rem look for it's default
configuration file in ~/.config/remind/remind.rem
I have added an alias so rem will output in colour
I have made zsh run `rem` when I open a new terminal if I don't have a
project set. I may remove this in the future
For some reason ctrl+x ctrl+e has stopped working. I think it is
probably related to the use of suckless scroll. This uses ctrl+e which
is interpreted as a scroll.
For now though, using ctrl+x is fine