Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
R.L. Dane :Debian: :OpenBSD: 馃嵉
R.L. Dane :Debian: :OpenBSD: 馃嵉
@rl_dane@polymaths.social  路  activity timestamp 2 weeks ago

HERE IS YOUR #bash history #recap / #rewind / #year_in_review !!!

grep -v "^[[:space:]]*#" ~/.bash_history |sed -E 's/^ *(sudo|doas) *//g' |awk '{print $1}' |sort |uniq -c |sort -n |tail -n $((LINES-2))

Example from this laptop:

 54 updateall
57 nsxiv
58 pipx
63 pkg_info
73 tail
92 git
106 ssh
109 w3m
110 less
127 echo
138 type
194 searchall
214 grep
225 ststatus
275 duck
286 ll
292 vi
341 man
433 cd
453 ls

(Of course, it's not strictly a YEAR in review. Bash can timestamp the history, but most people don't have that turned on by default)

#YearInReview

pinage404.rss :nixos:
pinage404.rss :nixos:
@pinage404@mamot.fr replied  路  activity timestamp 10 hours ago

@rl_dane I saw this just before sleep

I tried with #Fish

Fish store history as #YAML

I tweaked the command to make it barely works

Since it's YAML, it's store the timestamps

So, i tried to do an actual #year_in_review

3 hours later, here it is !

https://gitlab.com/pinage404/dotfiles/-/commit/5089def105806afe92684609a004081cf5aa136d

#FishShell #Fish_Shell #Recap #Rewind

  • Copy link
  • Flag this comment
  • Block
jbz
jbz
@jbz@indieweb.social  路  activity timestamp 2 days ago

馃悷 My favorite shell just got a new release

https://linuxiac.com/fish-shell-4-3-released-with-scripting-and-terminal-improvements/

#fishshell #opensource #shell

Linuxiac

Fish Shell 4.3 Released With Scripting and Terminal Improvements

Fish Shell 4.3 introduces smarter theming, improved completions, better terminal integration, and many changes across scripting and interactive features.
  • Copy link
  • Flag this post
  • Block
Pawe艂 艢wi膮tkowski boosted
Maikel 馃嚜馃嚭 馃嚜馃嚫
Maikel 馃嚜馃嚭 馃嚜馃嚫
@maikel@vmst.io  路  activity timestamp 6 months ago

This is how I do test-driven development in Elixir. This function is saved in .config/fish/functions so it preloads whenever I open the terminal. Fish shell is the one I've been using forever.

Then I can do either

onchange test/indie/domains_test.exs

OR

onchange test/indie/domains_test.exs --only dnssec

If I want to run specific tags only.

#Elixir#FishShell

function onchange
    if test (count $argv) -lt 1
        echo "Usage: onchange <file> [--only tag ...]"
        return 1
    end

    set file $argv[1]
    set args $argv[2..-1]

    echo "馃摗 Watching $file for changes..."

    while true
        inotifywait -e close_write,moved_to,create $file > /dev/null
        echo "馃攣 Change detected! Running test_trace $file $args..."
        test_trace $file $args
    end
end
function onchange if test (count $argv) -lt 1 echo "Usage: onchange <file> [--only tag ...]" return 1 end set file $argv[1] set args $argv[2..-1] echo "馃摗 Watching $file for changes..." while true inotifywait -e close_write,moved_to,create $file > /dev/null echo "馃攣 Change detected! Running test_trace $file $args..." test_trace $file $args end end
function onchange if test (count $argv) -lt 1 echo "Usage: onchange <file> [--only tag ...]" return 1 end set file $argv[1] set args $argv[2..-1] echo "馃摗 Watching $file for changes..." while true inotifywait -e close_write,moved_to,create $file > /dev/null echo "馃攣 Change detected! Running test_trace $file $args..." test_trace $file $args end end
  • Copy link
  • Flag this post
  • Block
Maikel 馃嚜馃嚭 馃嚜馃嚫
Maikel 馃嚜馃嚭 馃嚜馃嚫
@maikel@vmst.io  路  activity timestamp 6 months ago

This is how I do test-driven development in Elixir. This function is saved in .config/fish/functions so it preloads whenever I open the terminal. Fish shell is the one I've been using forever.

Then I can do either

onchange test/indie/domains_test.exs

OR

onchange test/indie/domains_test.exs --only dnssec

If I want to run specific tags only.

#Elixir#FishShell

function onchange
    if test (count $argv) -lt 1
        echo "Usage: onchange <file> [--only tag ...]"
        return 1
    end

    set file $argv[1]
    set args $argv[2..-1]

    echo "馃摗 Watching $file for changes..."

    while true
        inotifywait -e close_write,moved_to,create $file > /dev/null
        echo "馃攣 Change detected! Running test_trace $file $args..."
        test_trace $file $args
    end
end
function onchange if test (count $argv) -lt 1 echo "Usage: onchange <file> [--only tag ...]" return 1 end set file $argv[1] set args $argv[2..-1] echo "馃摗 Watching $file for changes..." while true inotifywait -e close_write,moved_to,create $file > /dev/null echo "馃攣 Change detected! Running test_trace $file $args..." test_trace $file $args end end
function onchange if test (count $argv) -lt 1 echo "Usage: onchange <file> [--only tag ...]" return 1 end set file $argv[1] set args $argv[2..-1] echo "馃摗 Watching $file for changes..." while true inotifywait -e close_write,moved_to,create $file > /dev/null echo "馃攣 Change detected! Running test_trace $file $args..." test_trace $file $args end end
  • Copy link
  • Flag this post
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.1-alpha.41 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct