Live data from Hacker News

CLI: Improved

remysharp.com

1–10 of 280 posts

Re: CLI: Improved

#3
> The bat command also allows me to search during output (only if the output is longer than the screen height) using the / key binding (similarly to less searching).

You can do this with `less -F `. It will show the file on the screen like `cat` unless it is longer than one screen, then it will go into paging mode and allow search with `/`.

Side note, how do you make his nice-looking prompt?

Re: CLI: Improved

#4
With tools like these or ripgrep it is useful to know whether the authors try to replace the old tool or not. This is usually stated somewhere in their readme or faq.

If they choose to approach some problems with different semantics, I would not recommend to alias the new tool over the old one. Just treat it as a like a separate tool and in most cases their new names are as comfortable to type as the 'legacy' tool's. The one exception that comes to my mind is 'exa' vs. 'ls'. Typing 'ls' is a single action for both hands while 'exa' has to be typed with the left hand alone (on QWERTY/Z layouts).

Re: CLI: Improved

#5

> The bat command also allows me to search during output (only if the output is longer than the screen height) using the / key binding (similarly to less searching). You can do this with `less -F `. It will show the file on the screen like `cat` unless it is longer than one screen, then it will go into paging mode and allow search with `/`. Side note, how do you make his nice-looking prompt?

you don't need the -F do you? unless I'm missing something you're saying about less

Re: CLI: Improved

#6

> The bat command also allows me to search during output (only if the output is longer than the screen height) using the / key binding (similarly to less searching). You can do this with `less -F `. It will show the file on the screen like `cat` unless it is longer than one screen, then it will go into paging mode and allow search with `/`. Side note, how do you make his nice-looking prompt?

Oh my zsh, powerlevel9k theme, iterm2 if you are on a mac.

Re: CLI: Improved

#8

> The bat command also allows me to search during output (only if the output is longer than the screen height) using the / key binding (similarly to less searching). You can do this with `less -F `. It will show the file on the screen like `cat` unless it is longer than one screen, then it will go into paging mode and allow search with `/`. Side note, how do you make his nice-looking prompt?

His prompt is the oh-my-zsh theme "agnoster".

https://github.com/robbyrussell/oh-my-zsh/wiki/Themes

Re: CLI: Improved

#10
post #4

With tools like these or ripgrep it is useful to know whether the authors try to replace the old tool or not. This is usually stated somewhere in their readme or faq. If they choose to approach some problems with different semantics, I would not recommend to alias the new tool over the old one. Just treat it as a like a separate tool and in most cases their new names are as comfortable to type as the 'legacy' tool's.…

If you like exa, maybe you like my modifications about hiding the time output optionally when using '--long', too.

https://github.com/thibran/exa/tree/time_style_hide

Example output of 'exa -l --time-style=hide':

    drwxr-xr-x - foo Desktop
    drwxr-xr-x - foo Documents
    drwxr-xr-x - foo Downloads
    drwxr-xr-x - foo Music
    drwxr-xr-x - foo Pictures
    drwxr-xr-x - foo src
    drwxr-xr-x - foo Videos
Post reply on HN