big update for doshshell.
hello everyone, today I introduce to you a shell I have been developing for a while now and have just come back
and added features to it.
I have to share a few reasons for building it.
I primarily use Windows as my dev environment and most of the time I work with PowerShell. PowerShell is powerful (it’s Microsoft after all) but
its syntax is too complicated and hard to remember. Also, PowerShell focuses on performance so modern shell features like fishshell
are not available. I once wished Windows could run bash because working with PowerShell was too boring. I also tried to find ways to install bash on
Windows, but there were only instructions to install it on WSL or Git Bash. Feeling frustrated, I decided to build my own shell for use. Since I went through the trouble of building it
I made it cross-platform
I think that on all platforms, running scripts or commands should just be one way instead of having each OS run differently like now
therefore doshshell was launched to do just that. No matter what OS you are on, it runs in the same way, helping everyone work in sync with the shell on all platforms
the second goal of doshshell is to replace traditional shells that are sluggish, slow, feature-poor, and hard to configure like bash and zsh
with a shell that has simple syntax, flexibility, speed, and ease of configuration
and the most important difference is that doshshell differs from traditional shells in that, I learned a very nice design philosophy from nu.
For bash/zsh, "Everything is text" means all pipelines are text so they easily break when the output format changes.
Whereas dosh, by design, follows "Everything is structured data". Each pipeline fully supports data types
String
Number
Boolean
Record
List
Table
DateTime
Duration
Filesize
unlike just text, text, and text of bash/zsh
- so what are its advantages??
- if the pipeline is text, you have to manually parse data, but if each pipeline represents clear data types
then the subsequent pipeline understands what the previous one is, what it returns. Thus, operations like searching or querying data are very
quick and convenient.
for example, getting a list of files you need looks like this in bash/zsh:
```
find . -maxdepth 1 -type f -size +1k \
| xargs stat --format="%s %n" \
| sort -n
```
It seems concise, but the syntax is quite confusing, making it hard to understand
with dosh, it’s easier and clearer
```
ls | where size > 1kb | where type == file | reverse | sort-by size
```
at a glance, you can understand the function of each pipeline.
or another example. For the process: find all .xlsx files, open the Users sheet, find the cell containing the text DoShell, change it to Dosh, and save to a new file in the out/ directory.
in dosh:
```
glob "**/*.xlsx"
| open-each
| sheet "Users"
| replace "DoShell" "Dosh" --recursive
| save --to-dir out --suffix ".updated"
```
Or more clearly:
```
glob "**/*.xlsx"
| open-each
| sheet "Users"
| where contains "DoShell"
| replace "DoShell" "Dosh" --recursive
| save --to-dir out --suffix ".updated"
```
Desired result:
from: reports/users.xlsx
to: out/users.updated.xlsx
with bash, it cannot process .xlsx, so you have to

Hạ tầng Open Banking cho thanh toán và quản lý dòng tiền

Remind you to drink water, stand up and take breaks while working

Triển khai Một chạm Tất Cả Open Source

Antigravity Workflow Framework - The Logic of Vibe Coding

Free SVG Icon Library

Screen Recorder & Auto Zoom

No talks yet
Create the first talk
Reviews & comments