warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
20.98k stars 359 forks source link

Don't allow empty commands #287

Open olivernybroe opened 2 years ago

olivernybroe commented 2 years ago

Describe the solution you'd like?

When pressing enter without having entered anything, don't trigger a command blocks.

Is your feature request related to a problem? Please describe.

I often accidentally press enter and ends up having a terminal with many empty command blocks.

I think by simply not executing when input is empty, it would help a lot of people having a more clean history and make the history easier to navigate in.

image

Additional context

No response

zheng commented 2 years ago

Interesting! I think quite a lot of people do like creating bunch of empty command blocks. You prefer not having these & being able to navigate up?

olivernybroe commented 2 years ago

I feel like this is a place where Warp can be special. Normally we create empty command blocks to "make space" between other commands, however the space is already there as warp has things in blocks and can solve that in other cools ways as you have full control.

However we still have the "bad habit" of creating empty command blocks.

It least when navigating through previous blocks in Warp it could be nice if it skipped the empty command blocks.

Other ideas could also be to add a spacer between commands when doing empty command blocks instead of the empty one. That way we get the more space we are trying to solve, but no clutter in UI at all and a clean nice command history

elviskahoro commented 2 years ago

Linking with Config #175. feels like the easy solution is to just make this toggleable in the config

dannyneira commented 6 months ago

@olivernybroe as a possible workaround, you can also press CMD-K on macOS/CTRL-SHIFT-K on Linux to clear the block history or run clear to remove some of those empty blocks.