Commit graph

50 commits

Author SHA1 Message Date
Jonathan Hodgson
9d4e340753 Makes fzf list packages for paru on tab 2022-02-20 14:32:33 +00:00
Jonathan Hodgson
5b7b051404 Removes auto-expand 2022-02-07 12:33:20 +00:00
Jonathan Hodgson
e993f2c566 Adds auto-expand to some of my aliases
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.
2021-11-28 20:58:16 +00:00
Jonathan Hodgson
ab27433fc4 FZF: adds git bindings and toggle preview
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.
2021-11-16 11:45:45 +00:00
Jonathan Hodgson
401fa12a5d Improvements to hashcat completion
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.
2021-11-04 19:38:13 +00:00
Jonathan Hodgson
0a724f3de5 ZSH: adds aws key regex to currenWordCompletions 2021-09-27 13:27:40 +01:00
Jonathan Hodgson
158b0befb3 Adds some more options to the change command function 2021-09-07 17:07:25 +01:00
Jonathan Hodgson
4b74958f9b Adds regex to current word completion 2021-09-07 14:00:06 +01:00
Jonathan Hodgson
b7c3e8d551 ZSH: make find file only give 1 result 2021-08-31 11:04:46 +01:00
Jonathan Hodgson
a654ca73fb ZSH: adds ^n keybinding to expand current word's filename
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
2021-08-31 10:46:58 +01:00
Jonathan Hodgson
02a44619f3 ZSH: fixes issue for creaing directory with ~ in path
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
2021-08-31 10:42:56 +01:00
Jonathan Hodgson
e4d2386912 ZSH: prompt: show branch on older versions of git 2021-08-23 15:24:34 +01:00
Jonathan Hodgson
8377a506be ZSH: checks for project in prompt 2021-08-23 15:22:05 +01:00
Jonathan Hodgson
69dd8e61c6 ZSH: checks for project in prompt 2021-08-23 15:19:48 +01:00
Jonathan Hodgson
c1ae69fb0f Make colours work now focus has been disabled 2021-03-21 14:54:10 +00:00
Jonathan Hodgson
a265f4e40e Only show explicitly installed when tab-completing pacman -R*
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.
2021-03-21 12:59:17 +00:00
Jonathan Hodgson
c9040c1772 Deletes focus zsh file 2021-03-21 12:57:57 +00:00
Jonathan Hodgson
add289c50d Adds cat to auto-notify ignore list 2021-03-21 12:56:40 +00:00
Jonathan Hodgson
979b0233a2 ZSH: Makes prompt shorter in narrow terminals
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
2021-02-18 21:38:50 +00:00
Jonathan Hodgson
862f2d2fed Adds check for fzf 2021-02-03 23:16:35 +00:00
Jonathan Hodgson
3bc35c9123 Adds checks to promptconfig 2021-02-03 23:12:28 +00:00
Jonathan Hodgson
e80443e891 ZSH: allows command swap key binding to support multiple groups
The groups are now separated by : character and each element in the
group is separated by a space

I have added a group for swapping ping and mtr
2020-10-14 12:29:16 +01:00
Jonathan Hodgson
2eeebca7fe ZSH: Add alt+c keybinding for swapping commands
By pushing alt+c, zsh will now cycle between vim, ls and cd. In the
future I may add more cycle groups
2020-10-13 15:59:16 +01:00
Jonathan Hodgson
97b514f1fa ZSH: makes edit with vim shortcut Ctrl+x
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
2020-10-06 14:33:07 +01:00
Jonathan Hodgson
d9ed39fc2e Adds unread emails to prompt 2020-09-19 11:23:21 +01:00
Jonathan Hodgson
15e23fcea6 Adds fzf completion to ytaudio 2020-09-19 11:22:53 +01:00
Jonathan Hodgson
3fa98cce86 Adds sl to commands not to notify on end 2020-09-19 11:20:34 +01:00
Jonathan Hodgson
04006153cc Adds conflicts to git prompt config 2020-07-29 17:21:26 +01:00
Jonathan Hodgson
c2b3afb04f Makes fg-bg work on more listeners 2020-07-29 17:20:45 +01:00
Jonathan Hodgson
76a0f58f9f makes fzf go to top on change 2020-07-29 17:19:50 +01:00
Jonathan Hodgson
872b76dc1c Adds aliased with prefix function 2020-07-29 17:16:18 +01:00
Jonathan Hodgson
4645d60a0e Stops tab completion prompting if there is a lot 2020-05-25 11:57:58 +01:00
Jonathan Hodgson
1bb7eb9fb8 Makes ctrl+t and alt+c shortcuts exclude node_modules 2020-05-25 11:57:27 +01:00
Jonathan Hodgson
b6c1b9efc6 Adds alt+m zle shortcut to create the directory for the current arg 2020-05-22 17:37:21 +01:00
Jonathan Hodgson
448efc999b Adds overide completions for msfvenom payloads and pacman -Ql 2020-05-22 17:35:41 +01:00
Jonathan Hodgson
1ab41b47a1 Changes behaviour of ctrl t in zsh
Now pressing ctrl t will sometimes search directories if more
appropriate.

Pressing alt+c will now to whatever ctrl+t doesn't do if I ever need the
alternative type.
2020-05-22 17:33:45 +01:00
Jonathan Hodgson
7c7c6c2045 Makes completion look better with descriptions etc 2020-05-22 17:32:19 +01:00
Jonathan Hodgson
aea3ba2730 Split completion overide scripts up and into seperate files 2020-05-09 20:44:18 +01:00
Jonathan Hodgson
f2251d9af5 Mostly improving fzf tab on-word complete 2020-05-08 20:42:26 +01:00
Jonathan Hodgson
ac48d66ff8 Tidy up prompt config script 2020-05-08 16:40:40 +01:00
Jonathan Hodgson
e63c35329d Adds spaces to allow for double with icons 2020-04-15 15:00:57 +01:00
Jonathan Hodgson
b97b3a418b Makes fzf work better if key-bindings and completion in Debian location 2020-03-31 09:13:24 +01:00
Jonathan Hodgson
c1b48ecb53 Adds untracked files to git prompt 2020-03-29 19:21:32 +01:00
Jonathan Hodgson
721b2aaa9d Fixes git tag and makes fzf default to ansi colours 2020-03-29 19:15:09 +01:00
Jonathan Hodgson
e6f453a36d Adds msfvenom completion with payloads
Also some small fzf and prompt changes
2020-03-23 15:28:59 +00:00
Jonathan Hodgson
0988d27e7a Stops the terminal sending focus events when process is running 2020-03-11 18:11:39 +00:00
Jonathan Hodgson
a0355dbf88 Adds ctrl+z binding 2020-03-11 17:40:45 +00:00
Jonathan Hodgson
1ec39640b9 Shell config changes 2020-03-11 12:56:06 +00:00
Jonathan Hodgson
4893824aff Lots of zsh changes 2020-03-11 11:30:54 +00:00
Jonathan Hodgson
c9291ffcbf Moves includes into includes folder 2020-02-19 12:07:52 +00:00