shell function doesn't be automatically completed by tab
Discord username (optional)
No response
Describe the bug
Created shell functions or command aliases in Warp envrionment cannot be completed by tab. Issue is on both of Mac OS and Linux version.
To reproduce
- Run Warp
- Create a shell function, for example,
~
$ function test_fn
function> ls
~
- Type test and push the TAB
- Can confirm there's no
test_fnin candidate list
Expected behavior
Shell function or aliased command should be appear as candidate when doing TAB auto completioin Note that
- No issue if invoking the function by fully typing the
test_fnmanually with Enter. - No issue at all with other terminal programs such as Mac OS's terminal or Gnome terminal of Linux
Screenshots
No response
Operating system
MacOS
Operating system and version
14.4.1
Shell Version
No response
Current Warp version
v0.2024.04.16.08.02.stable_00
Regression
No, this bug or issue has existed throughout my experience using Warp
Recent working Warp date
No response
Additional context
No response
Does this block you from using Warp daily?
Yes, this issue prevents me from using Warp daily.
Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)
Yes, this I confirmed this only happens in Warp, not other terminals.
Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e
None
Hi @ruukina since Warp should load the completion for the function if you put in to your rc file (i.e.~/.zshrc) and load a new session (window/tab/pane).
@dannyneira , thank you for your comment. But unfortunately, it cannot be a solution. Not all shell functions or aliases are "static".
For example, Google provides "lunch" as a shell function when building AOSP. But even if you did "source build/envsetup.sh", which defines the "lunch", on Warp, you cannot find "lunch" from Warp's auto completion candidate list. Not only "lunch", evnsetup.sh provides number of functions for development convenience.
@ruukina thanks for your patience. there is no fix for dynamically updating shell functions to be loaded on the fly in Warp. Your best bet is to fallback to shell completions by running your preferred shell zsh, bash, fish`, in a subshell.
We are tracking shell completion request here: https://github.com/warpdotdev/Warp/discussions/434