mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
alias stuff removed
This commit is contained in:
parent
7e4b330e98
commit
d94d2bf8d1
2 changed files with 4 additions and 11 deletions
|
|
@ -60,12 +60,6 @@ The plugin provides autocompletion and enhanced functionality for the following
|
||||||
| `rm` | Remove a model from the local system. |
|
| `rm` | Remove a model from the local system. |
|
||||||
| `help [command]` | Provide help information for a command. |
|
| `help [command]` | Provide help information for a command. |
|
||||||
|
|
||||||
### Alias
|
|
||||||
|
|
||||||
The plugin includes an alias for convenience:
|
|
||||||
|
|
||||||
- `o`: This is an alias for the `ollama` command, allowing you to use `o` as a shorthand for executing Ollama commands. Useful when jumping around the command line frequently.
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
>>> o ls
|
>>> o ls
|
||||||
NAME ID SIZE MODIFIED
|
NAME ID SIZE MODIFIED
|
||||||
|
|
|
||||||
|
|
@ -68,8 +68,10 @@ _ollama() {
|
||||||
# Handle argument completion based on the specified command
|
# Handle argument completion based on the specified command
|
||||||
case $words[1] in
|
case $words[1] in
|
||||||
run|rm|stop|show|pull|push)
|
run|rm|stop|show|pull|push)
|
||||||
# For these commands, provide model name suggestions
|
# For these commands, provide model name suggestions exactly once
|
||||||
_ollama_get_models
|
if [[ $CURRENT -eq 2 ]]; then
|
||||||
|
_ollama_get_models
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
cp)
|
cp)
|
||||||
if [[ $CURRENT -eq 2 ]]; then
|
if [[ $CURRENT -eq 2 ]]; then
|
||||||
|
|
@ -101,6 +103,3 @@ _ollama() {
|
||||||
|
|
||||||
# Register the '_ollama' function as the completion handler for the 'ollama' command
|
# Register the '_ollama' function as the completion handler for the 'ollama' command
|
||||||
compdef _ollama ollama
|
compdef _ollama ollama
|
||||||
|
|
||||||
# Register aliases
|
|
||||||
alias o=ollama
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue