I'm trying to implement completion for a function, where the completion for the second argument depends on the first one.
function test_so() {
echo "$1" "$2"
}
function _test_so() {
local state
_arguments '1: :->arg1' '2: :->arg2'
case…
I use zsh and I want to use a function I wrote to replace cd.
This function gives you the ability to move to a parent directory:
$ pwd
/a/b/c/d
$ cl b
$ pwd
/a/b
You can also move into a subdirectory of a parent directory:
$ pwd
/a/b/c/d
$ cl b/e
$…
I'm trying to change the colour of the autocomplete (from history) so that it doesn't match my input color (maybe same color less opacity..). Here's a pic:
Is this possible? (I'm using Terminator, if that helps at all..)
My goal is to generate zsh completions for a program I am writing. One option would be to write a lengthy completion file that lists all arguments and options, but since I often add arguments and options I would love zsh to handle the generation of…
SOLUTION STILL NOT FOUND :
I am faced different prolems with zsh which are not expected on MaOS Catalina/iTerm2.
I) Indeed, if I divide for example a big original window of iTerm2 (only once terminal) into 4 panes, and moreover, if I have a long…
I'm trying to get aws-cli autocompletion working in my zsh using oh-my-zsh, fzf, zsh-completion and fzf-tab-completion.
But when I hit tab after aws I get the following error:
compgen:96:command not found: aws_completer
This is my .zshrc:
source…
How can I disable the kubectl autocompletions functionality on zsh. I'm running on osx and the autocompletions are slow(probably because they have to call the remote cluster API) and I don't want them no more.
Scenario:
Let's say a script my_online_searcher opens a browser with the search for query, where query can be multiple words long. This same script also provides a utility flag -s that shows the search engine's suggestions. E.g.:
$…
I discovered this little navigation trick the other day, which allows me to trigger menu completions by number when I enter 'cd -'
~ cd -
0 -- ~/home
1 -- ~/home/stuff
2 -- ~/downloads
3 -- ~/wallpaper
Shell scripting syntax still reads like a…
I'm using _values to add completion to a custom zsh command, but unfortunately, zsh ignores the order in which I pass the values and sorts in reverse order of what I what (I want sort -rn, basically).
Is there anyway to force it to respect the…
One thing I like about zsh autocompletion is how it handles situation when more than 1 item matches the pattern. Say I have folders:
./
abc/
bbc/
bcd/
In zsh, when I type b and , I can see all the suggestions starting with b (same as in…
To quickly and temporarily append a directory to my PATH environment variable I usually do export PATH=$PATH:/some/other/dir however zsh does not tab-complete the part after the colon typing :/so.
Typing export PATH=/so expands to export…
I'm trying to figure out how to customize zsh completion so that it never completes beyond an ambiguous result by just hitting tab. Here's an example.
$ emacs f
food fool
(completes into)
$ emacs foo
food fool
Importantly, if I press TAB…
When using completion inside a double quoted string, zsh strips the leading ". E.g.
export PATH="$HOME/software
becomes
export PATH=$HOME/software
How can I convince zsh that I like the leading double quote and keep it?
Here's an example snippet from my current zsh session:
llama@llama:...Code/cpp/KingOfTheCode$ make
clang++ -std=c++11 -Iinclude src/*.cpp kothsrc/*.cpp -pthread -o KingOfTheCode
llama@llama:...Code/cpp/KingOfTheCode$ ./
Completing executable file or…