nixers
What shell do you guys use? - Printable Version
+- nixers (https://nixers.net)
+-- Forum: Operating Systems & Administration (https://nixers.net/Forum-Operating-Systems-Administration)
+--- Forum: BSD (https://nixers.net/Forum-BSD)
+--- Thread: What shell do you guys use? (/Thread-What-shell-do-you-guys-use)
Pages: 1 2 3 4


RE: What shell do you guys use? - jkl - 27-03-2023

Sadly, on macOS's Homebrew, rc comes without readline. I don't really want to install pkgsrc on this computer just to have that. I wonder if there is an easy fix.


RE: What shell do you guys use? - seninha - 29-03-2023

(27-03-2023, 06:35 PM)jkl Wrote: Sadly, on macOS's Homebrew, rc comes without readline. I don't really want to install pkgsrc on this computer just to have that. I wonder if there is an easy fix.
I can only think on two workarounds: call rc through rlwrap if you're running on a regular terminal, or use 9term and rely on its line editing system. The latter is the closest you get to plan9 regarding line editing on the shell.


RE: What shell do you guys use? - jkl - 07-04-2023

9term is a rather good idea which I did not have myself, thank you. :)
rlwrap would probably work too. I'll see what I can do with it...

edit:

Quote:rlwrap: warning: rlwrap appears to do nothing for rc, which asks for
single keypresses all the time. Don't you need --always-readline
and possibly --no-children? (cf. the rlwrap manpage)

Well... :)

edit: Had to use Git for the best option (namely, just use Byron's rc and enable readline (and the built-in history!) myself).

Code:
% git clone https://github.com/rakitzis/rc
% cd rc; autoreconf -i
% ./configure --with-edit=readline --with-history
% make ; sudo make install

Works. (If readline can't be found, setting LDFLAGS and CPPFLAGS to point to readline's /lib/ and /include/ folders fixes it.)

Finally, a sane shell again. I also used this opportunity to figure out how to make rc case-insensitive when compiled with readline:

Code:
# ~/.inputrc
set completion-ignore-case On

Good enough!


RE: What shell do you guys use? - jkl - 11-06-2023

rc seems to get rid of autotools and no longer has the history only as an optional feature. Good.
https://github.com/rakitzis/rc/commit/0e3a9e13f0cf81c0ed2cd50793ae953110fdec57


RE: What shell do you guys use? - rocx - 12-06-2023

Fish because I'm a filthy casual who doesn't write shell scripts anymore.


RE: What shell do you guys use? - jkl - 12-06-2023

You don't need to use the same interactive shell as you use for your scripts. Never had, never will.


RE: What shell do you guys use? - rocx - 19-06-2023

(12-06-2023, 05:30 PM)jkl Wrote: You don't need to use the same interactive shell as you use for your scripts. Never had, never will.

I know. I just haven't bothered with shell scripts because I moved to "normal people" distros like Fedora with GNOME so I don't faff about terminals like I used to. Fish just helps when I'm having to manually do commands anyway like hosting WEBrick for Jekyll. Everything else I got an Emacs frontend for or is moot using GNOME (aka no more X11 shenanigans just to make the window manager do things).

Back when I was on Void Linux with herbstluftwm or cwm, majority of my shell scripts were just to configure my window manager and handle any app-specific issues in that environment. Now those aren't necessary so...why bother? 🤷🏻‍♂️


RE: What shell do you guys use? - x0ba - 08-08-2023

zsh for the win! i use it with fzf-tab, powerlevel10k, and fish-style autosuggestions.


RE: What shell do you guys use? - Dworin - 26-08-2023

just standard bash.


RE: What shell do you guys use? - jkl - 04-09-2023

bash is not a standard.


RE: What shell do you guys use? - Dworin - 09-09-2023

Yep, poor choice of words on my side. I meant plain, boring etc.


RE: What shell do you guys use? - jkl - 09-09-2023

Ah. Why do you use boring software? ;-)


RE: What shell do you guys use? - Dworin - 11-09-2023

It's installed by default and I'm too lazy to change it.


RE: What shell do you guys use? - z3bra - 12-09-2023

(11-09-2023, 05:38 AM)Dworin Wrote: It's installed by default and I'm too lazy to change it.

No prob, just wait for the next shellshock bug so someone can do it for you remotely ;)


RE: What shell do you guys use? - santafe - 12-09-2023

I use fish because it is easy, but i would better like to see a drastical reform in cli/tui shells, something along the lines of nushell, but graphically.


RE: What shell do you guys use? - jkl - 13-09-2023

Graphically? Do you need more pictures?


RE: What shell do you guys use? - santafe - 13-09-2023

(13-09-2023, 11:35 AM)jkl Wrote: Graphically? Do you need more pictures?
CLI tools are cool, but they are constrained by the features provided by the console, so the lowest common dominator is the 80x24 resolution, which allows the user to use the well known programs to restore the system in emergency. This can means life or death in serious situations, so of course it make sense to be able to use those tools even trough a real teletype. But it doesn't means it is the best possible way to do actual work in non-emergency situation.


RE: What shell do you guys use? - jkl - 13-09-2023

I know that this might sound heretic, especially on Nixers, but the best possible way to do actual work in a non-emergency situation is not the CLI. This is not related to the inadequacy of the surrounding console window.


RE: What shell do you guys use? - ckester - 14-09-2023

(13-09-2023, 06:18 PM)jkl Wrote: I know that this might sound heretic, especially on Nixers, but the best possible way to do actual work in a non-emergency situation is not the CLI. This is not related to the inadequacy of the surrounding console window.

It probably depends on the task.

I like to distinguish between CLI and TUI, by the way, when thinking about questions like this. And between both of them and GUI, which in turn leads to a distinction between rudimentary xt or gtk applications, for example, and full-blown desktop environments. All of which have their place.


RE: What shell do you guys use? - rocx - 16-09-2023

(13-09-2023, 06:18 PM)jkl Wrote: I know that this might sound heretic, especially on Nixers, but the best possible way to do actual work in a non-emergency situation is not the CLI. This is not related to the inadequacy of the surrounding console window.

The biggest advantage of GUIs rather than CLIs. You can learn a bit about a program's capabilities by poking around menus. People praise the manpage and yet it's as useless as rifling through a large binder. There's no hyperlinking in a manpage: just grepping back and forth with a plethora of false positive matches. TUIs can come close but are still bogged down by their 80x24 cages.

Even what we consider the "gold standard" of CLIs can be reworked. It can be better. We just stubbornly insist on POSIX like LARPers in front of a DEC machine.


RE: What shell do you guys use? - ckester - 16-09-2023

The biggest advantage of CLIs is probably their scriptability.

They're all about the functionality, not the user interface. In fact, I think they're at their best in contexts like a crontab where any output is redirected to a file or /dev/null.


RE: What shell do you guys use? - venam - 17-09-2023

(16-09-2023, 09:56 PM)ckester Wrote: The biggest advantage of CLIs is probably their scriptability.

Then why not both, and have something like what is proposed in these two thread here and here. Scripts that can suddenly become graphical interfaces, or interfaces that can become scriptable. It would be fun to have the classic CLI vs GUI in its own thread though to dive deeper in the topic.


RE: What shell do you guys use? - ckester - 18-09-2023

AppleTalk might have been the best example of how to script a GUI application. But I haven't been on an Apple system in years and don't know what they have along those lines now.


RE: What shell do you guys use? - jkl - 18-09-2023

AppleTalk's auto-configuration features mostly live on in Bonjour, (GUI) scripting is preferably done with the Automator and Apple's own AppleScript (that resembles Smalltalk): https://en.wikipedia.org/wiki/Automator_(macOS)


RE: What shell do you guys use? - ckester - 18-09-2023

Oops, I was thinking of AppleScript not AppleTalk. It's been that long since I've looked at anything Apple. ($$$)