mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#nushell

1 post1 participant1 post today

Can we please have one standard way to define shell completions, that is compatible with all shells?

I'm moving from zsh to nushell, and it's relatively new, and you have to configure completions by writing a lot of code, including a lot of files, it's a nightmare.

It's easier for older shells like zsh or fish only because other people already done it, and some packages include per-shell completions.

There is @carapace_sh which attempts to do the right thing, but having completions in the other place than actual app is not very good idea.

usage.jdx.dev/ is trying to do the same but differently, and it has a way for an app to provide a schema for completions. This is step in the right direction, but not many tools support this.

Has anyone tried to put this somehow on the shell level? E.q. app includes a file like `myapp.completions` , and shell have a module which reads the file and generates a list of completions based on user input.

The right way to do this, is probably by defining a standard cross-platform/cross-shell schema. And it can be read by the shell, or by the tool like carapace or usage...

usage.jdx.devUsageSchema for CLIs
#Linux#zsh#bash

I finally after years meaning to spent like 2 hours messing around in #nushell and yep … I think I kinda love this

“Who could have predicted—based on my previous (~chronological) enthusiasms for perl, ruby, complex bash, jq, k8s, elixir, rust, & powershell—that I might have this reaction?!” 🤔

The fact that against an empty prompt I hit tab and quickly discovered `ansi gradient` really probably clenched it tho

셸 언어는 때로 추하길 요구 받는다

hackers.pub/@hongminhee/2025/s

Hackers' Pub · 셸 언어는 때로 추하길 요구 받는다명령줄 인터페이스(CLI)는 컴퓨터와 상호작용하는 가장 오래된 방식 중 하나다. 그리고 이 인터페이스를 지배하는 것은 셸 언어다. 그런데 흥미로운 점은 셸 언어가 일반적인 프로그래밍 언어들과는 상당히 다른 설계 철학을 따른다는 것이다. 한 마디로 요약하자면, 셸 언어는 때로 “추함”을 받아들여야 한다.간결함의 미학 Bash나 zsh와 같은 전통적인 셸을 보자. grep -r "error" /var/log | wc -l와 같은 명령은 암호처럼 보일 수 있지만, 타이핑하는 데 몇 초밖에 걸리지 않는다. 이러한 간결함은 우연히 생긴 것이 아니다. 셸 환경에서는 사용자가 빠르게 입력하고, 결과를 확인하고, 다시 명령을 수정하는 반복적인 워크플로우가 일반적이다. 여기서 핵심은 “대화형” 경험이다.PowerShell의 딜레마 PowerShell은 마이크로소프트가 셸의 개념을 재정의하려 한 야심찬 시도였다. 객체 지향적 파이프라인, 일관된 동사–명사 구문, 그리고 자세한 매개변수 이름 등은 모두 코드의 가독성과 유지보수성을 높이기 위한 설계였다. 그러나 다음 명령을 비교해보자: Bash:find . -name "*.log" -mtime -7 \ | xargs grep "error" \ | sort \ | uniq -c<PowerShell:Get-ChildItem -Path . -Filter *.log ` | Where-Object {$_.LastWriteTime -gt (Get-Date).AddDays(-7)} ` | ForEach-Object {Select-String -Path $_.FullName -Pattern "error"} ` | Sort-Object ` | Group-Object ` | Select-Object Name,Count<PowerShell의 명령은 더 명확하고 자기 설명적이지만, 대화형 셸에서 빠르게 실험하고 반복하기에는 너무 장황하다. PowerShell 설계자들은 “추함”을 견디지 못하고 너무 많은 “다림질”을 해버린 것이다.균형점 찾기 흥미롭게도 최근의 Nushell 같은 현대적인 셸은 이 교훈을 받아들이고 있다. 구조화된 데이터 처리와 같은 PowerShell의 장점을 가져오면서도, 대화형 사용에 필요한 간결함을 유지하려 노력한다. 셸 언어의 진정한 성공은 “아름다운 코드”와 “효율적인 상호작용” 사이의 균형에 달려 있다. 이는 때로 완벽한 문법이나 일관성보다는 실용적인 “추함”을 수용해야 함을 의미한다.결론 프로그래밍 언어의 세계에서는 우아함과 일관성이 미덕이다. 그러나 셸의 세계에서는 타이핑 효율성, 속도, 그리고 대화형 적합성이 우선시된다. 이것이 바로 셸 언어가 때로 “추함”을 요구받는 이유다. PowerShell의 제한적인 성공은 이 기본적인 진실을 간과한 데서 비롯된 것일지도 모른다. 그리고 어쩌면 이것은 소프트웨어 설계 전반에 걸친 더 깊은 교훈을 담고 있다: 모든 도구는 그 사용 맥락에 맞게 설계되어야 한다는 것이다. 셸 언어에서는 그 맥락이 바로 키보드와 사용자 사이의 빠른 대화다.
#cli##nushell

So #nushell depreciated some part of an old default config, so I removed the depreciated option (--ignore-error or something from a `do` in the prompt), now I get an ugly error from the prompt processing everytime I'm not somewhere in ~.

This is not enjoyable.

Replied in thread

`sudo xbps-install wmenu clipman font-adobe-source-code-pro gdu btop micro fastfetch nushell syncthing`

`mkdir ~/.config/foot/`

`cp /etc/xdg/foot/foot.ini ~/.config/foot/foot.ini`

`micro ~/.config/foot/foot.ini`

Default shell: `shell=/usr/bin/nu`. It is possible to set #nushell as the login shell, but I would say it is unnecessary and on Void would require adding environment variables to `$nu.env-path` (github.com/nushell/nushell/iss), which is annoying.

Describe the bug I set nushell as my login shell and then found that ncmpcpp no longer displays UTF-8 characters. I tracked this down to the missing LANG environment variable that is supposed to be...
GitHubnushell doesnt inherit /etc/locale.conf when used as a login shell · Issue #7941 · nushell/nushellBy rukai