Closed isanmu closed 1 year ago
Hi @isanmu, I'm Danny, a Support Engineer at Warp. Thanks for letting us know! We're sorry about this, this is not an ideal experience.
For cd completion/suggestions, you can toggle "Open Completions as you type" in WarpsSettings > Features
Then disable your alias/function just for Warp by putting it in this conditional statement:
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
##### WHAT YOU WANT TO DISABLE FOR WARP - BELOW
function cdd(){
cd $1;ls
}
alias cd='cdd'
##### WHAT YOU WANT TO DISABLE FOR WARP - ABOVE
fi
Or you can try with just the alias( no function) like this instead:
alias cd='cd $1 ; ls'
If you still see an issue, you may have an incompatible tool you need to add to the conditional statement: https://docs.warp.dev/help/known-issues#list-of-incompatible-tools Also, see more info on custom prompts here: https://docs.warp.dev/features/prompt
Please let me know if this helps with your issue.
@dannyneira Thanks for your reply and suggestions.
I already toggle "Open Completions as you type". And it work fine in Warp
I could get completions/suggestions if type cd
in Warp before alias.
After add function and alias, I lost the completions in Warp, but normal in other Terminals
I actually expect alias(plus functions) work well in Warp, not disable it in Warp.
I have tried alias cd="cd $1 ; ls"
before, but it seems only ls
worked, while cd
not(like picture bellow, i cd
to folder Applications
, but it work as command ls ./Applications
, and still keep in ~
folder. ). That's why i turn to use function instead.
Anyway, It would be great to support auto completions/suggestions for alias(plus with functions) in Warp in the future.
Thanks for your feedback, i'll change this one to a Feature Request to support alias functions in Warp.
After update, warp support alias cd="cd $1 ; ls"
now, and work fine!
@isanmu Nice! what about the other functions you mentioned above? Are we Okay to close this request?
function cdd(){
cd $1;ls
}
alias cd='cdd'
@isanmu Nice! what about the other functions you mentioned above? Are we Okay to close this request?
function cdd(){ cd $1;ls } alias cd='cdd'
Sorry, it's my mistake. 😵💫 alias cd="cd $1 ; ls"
still worked as ls
and lost function ofcd
...
And for function way, warp still lost auto completions.
Sorry for mistakenly thinking it worked after update.
@isanmu Nice! what about the other functions you mentioned above? Are we Okay to close this request?
function cdd(){ cd $1;ls } alias cd='cdd'
This feature is supported now(test in latest version) and this request could be closed. Thanks for support of this feature! 😄 @dannyneira
Discord username (optional)
No response
Describe the bug
First, Warp support automatic completion/selection for command
cd
;Second, I alias
cd
to function:But automatic completion/selection cannot work in Warp, that confused me.
Third, While i test it in iTerm, Tabby or just local terminal, they all support automatic completion/selection.
e.g. In Warp, no hints for
cd
In other terminals, exist hints for
cd
(with same alias)To Reproduce
~/.zshrc
source ~/.zshrc
or open new tabcd
withTab
keyExpected behaviour
expect automatic completion and selection
Screenshots
No response
Operating System
MacOS
OS Version
12.6
Shell Version
zsh 5.8.1 (x86_64-apple-darwin21.0)
Warp Version
v0.2022.10.18.08.10.stable_03
Additional context
No response
Does this block you from using Warp daily?
Yes
Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e
No response