1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-04 16:11:06 +01:00
home-manager/tests/modules/programs/fabric-ai/bashrc
Alex 381f4f8a3a
bash: don't explicitly set checkwinsize (#8182)
checkwinsize is enabled by default since bash5.

It's not much hassle if enabled, but it's not necessary anymore and it conflicts if attempting to piggy-back on .bashrc with other kinda-compatible shells (e.g. osh).
bash5 is default for a couple of years already, and there is no bash4 in there at all
2025-11-25 02:31:19 +01:00

38 lines
765 B
Bash

# Commands that should be applied only for interactive shells.
[[ $- == *i* ]] || return
HISTFILESIZE=100000
HISTSIZE=10000
shopt -s histappend
shopt -s extglob
shopt -s globstar
shopt -s checkjobs
if [[ ! -v BASH_COMPLETION_VERSINFO ]]; then
. "@bash-completion@/etc/profile.d/bash_completion.sh"
fi
yt() {
if [ "$#" -eq 0 ] || [ "$#" -gt 2 ]; then
echo "Usage: yt [-t | --timestamps] youtube-link"
echo "Use the '-t' flag to get the transcript with timestamps."
return 1
fi
transcript_flag="--transcript"
if [ "$1" = "-t" ] || [ "$1" = "--timestamps" ]; then
transcript_flag="--transcript-with-timestamps"
shift
fi
local video_link="$1"
fabric -y "$video_link" $transcript_flag
}