home.social

#unixshells — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #unixshells, aggregated by home.social.

  1. @rl_dane

    The alternative is to make the shell handle the un-escaping:

    echo hello,there |sed 's/,/'"\n"'/g'

    It's undocumented in several ksh flavours, but nonetheless works. However, those flavours also (trying a quick few tests) support the better way, which is also undocumented though:

    echo hello,there |sed $'s/,/\n/g'

    #sed #UnixShells #KornShell #OpenBSD #ksh

  2. @josevnz

    Looks complex. (-:

    C shell:

    % printf '%s\n' $path

    Z shell:

    % printf '%q\n' "$path[@]"

    #UnixShells #CShell #ZShell #zsh #csh

  3. @rqm

    @rl_dane hit the nail on the head.

    This isn't really specific to completion. It's just general overlong input line editing behaviour.

    The PD #KornShell and its derivatives (e.g. the #MirBSD Korn Shell) only have line editing with a single line that sideways scrolls.

    ksh93, however, has a
    set -o multiline
    option for switching to a multiple-line line editing mode. (The Z and Bourne Again shells have similar.)

    You might like the Watanabe shell. It's in ports.

    @magicant
    #UnixShells

  4. @rl_dane

    I was curious as to what this meant, so I fired up PD ksh and tried what I thought long command-prompt entries meant.

    The PD #KornShell uses a column width greater than the terminal width (which I set to 50 columns here, just to make things easier) because it SPC-pads everything to the length of the longest string; and ends up double-spacing most rows in the table as a consequence.

    I couldn't figure out how to get it to specifically clip rows, though.

    @rqm
    #UnixShells