added and fixed autocompletes
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
# Completions for custom scripts from https://git.honney333.work/honney/custom_scripts
|
||||
function __fish_custom_scripts_complete_video_files
|
||||
__fish_complete_suffix .mp4 .mkv .avi .mov .webm .m4v .flv .ts .mts .m2ts .wmv
|
||||
end
|
||||
|
||||
# === Scripts with no arguments ===
|
||||
complete -c deinterlacing_cpu.sh -f -d "Deinterlace hardcoded MKV file using CPU (yadif/x264)"
|
||||
complete -c deinterlacing_gpu.sh -f -d "Deinterlace hardcoded file using VAAPI GPU acceleration"
|
||||
complete -c generate-thumb -f -d "Generate thumbnails for video files via scene detection"
|
||||
complete -c list_folder_empty -f -d "List non-empty subdirectories and file extension types"
|
||||
complete -c show_path -f -d "Display each PATH entry on a separate line"
|
||||
complete -c time_add.py -f -d "Sum space-separated timecodes from user input"
|
||||
complete -c sub_dub -f -d "Analyze MKV files and update Excel spreadsheet"
|
||||
|
||||
# === Scripts with mode as first argument ===
|
||||
complete -c append -n "not __fish_seen_subcommand_from front back ext" -k -a "front" -d "Prepend string to filename"
|
||||
complete -c append -n "not __fish_seen_subcommand_from front back ext" -k -a "back" -d "Append string to filename"
|
||||
complete -c append -n "not __fish_seen_subcommand_from front back ext" -k -a "ext" -d "Add string before file extension"
|
||||
complete -c append -n "__fish_seen_subcommand_from front back ext" -a "(__fish_complete_directories)" -d "Target directory"
|
||||
complete -c deappend -n "not __fish_seen_subcommand_from front back ext" -k -a "front" -d "Remove prefix from filename"
|
||||
complete -c deappend -n "not __fish_seen_subcommand_from front back ext" -k -a "back" -d "Remove suffix from filename"
|
||||
complete -c deappend -n "not __fish_seen_subcommand_from front back ext" -k -a "ext" -d "Remove file extension"
|
||||
complete -c deappend -n "__fish_seen_subcommand_from front back ext" -a "(__fish_complete_directories)" -d "Target directory"
|
||||
complete -c tracker.py -n "not __fish_seen_subcommand_from add sub ranking" -k -a "add" -d "Increment usage count"
|
||||
complete -c tracker.py -n "not __fish_seen_subcommand_from add sub ranking" -k -a "sub" -d "Decrement usage count"
|
||||
complete -c tracker.py -n "not __fish_seen_subcommand_from add sub ranking" -k -a "ranking" -d "Show usage ranking"
|
||||
complete -c video-audio -n "not __fish_seen_subcommand_from extract include" -k -a "extract" -d "Extract audio from MKV files"
|
||||
complete -c video-audio -n "not __fish_seen_subcommand_from extract include" -k -a "include" -d "Re-include extracted audio into MKVs"
|
||||
complete -c video-audio -n "__fish_seen_subcommand_from extract include" -a "(__fish_complete_directories)" -d "Video directory"
|
||||
|
||||
# === Scripts with flags ===
|
||||
complete -c count_files -l undo -d "Undo previous numbering"
|
||||
complete -c remove_fname_last_n -l undo -d "Undo previous rename"
|
||||
complete -c split_mkv_by_chapter -l only_between -d "Only output between given timestamps"
|
||||
complete -c split_mkv_by_chapter -a "(__fish_custom_scripts_complete_video_files)" -d "Input MKV file"
|
||||
complete -c substract_episode_num.py -s n -l dry-run -d "Dry run (show without modifying)"
|
||||
|
||||
# === Scripts accepting video files and/or directories ===
|
||||
complete -c ff -d "Display detailed media info (codec, resolution, audio, subs, bitrate)"
|
||||
complete -c ff -a "(__fish_custom_scripts_complete_video_files) (__fish_complete_directories)"
|
||||
complete -c set_1_ger -d "Set first audio track language to German in MKV files"
|
||||
complete -c set_1_ger -a "(__fish_custom_scripts_complete_video_files) (__fish_complete_directories)"
|
||||
complete -c set_audio_lang -d "Set/overwrite audio track language metadata"
|
||||
complete -c set_audio_lang -a "(__fish_custom_scripts_complete_video_files) (__fish_complete_directories)"
|
||||
complete -c simple_ffprobe_script -d "Display detailed video file info"
|
||||
complete -c simple_ffprobe_script -a "(__fish_custom_scripts_complete_video_files) (__fish_complete_directories)"
|
||||
complete -c extract_audio -d "Extract audio tracks from video files"
|
||||
complete -c extract_audio -a "(__fish_custom_scripts_complete_video_files) (__fish_complete_directories)"
|
||||
complete -c extract_audio.py -d "Extract all audio tracks as MP3"
|
||||
complete -c extract_audio.py -a "(__fish_custom_scripts_complete_video_files) (__fish_complete_directories)"
|
||||
complete -c extract_subtitles -d "Extract subtitle tracks from video files"
|
||||
complete -c extract_subtitles -a "(__fish_custom_scripts_complete_video_files) (__fish_complete_directories)"
|
||||
complete -c extract_subtitles.py -d "Extract all subtitle tracks as SRT"
|
||||
complete -c extract_subtitles.py -a "(__fish_custom_scripts_complete_video_files) (__fish_complete_directories)"
|
||||
|
||||
# === Scripts accepting video files only ===
|
||||
complete -c ffbitrate -d "Display overall bitrate of a video file"
|
||||
complete -c ffbitrate -a "(__fish_custom_scripts_complete_video_files)"
|
||||
complete -c ffsplit -d "Split video file into segments at given timestamps"
|
||||
complete -c ffsplit -a "(__fish_custom_scripts_complete_video_files)"
|
||||
complete -c split_mkv_by_chapter.py -d "Split MKV at chapter boundaries"
|
||||
complete -c split_mkv_by_chapter.py -a "(__fish_custom_scripts_complete_video_files)"
|
||||
complete -c embed_audio -d "Embed MP3 audio track into video file"
|
||||
complete -c embed_audio -a "(__fish_custom_scripts_complete_video_files)"
|
||||
complete -c embed_subtitles -d "Embed subtitle file into video file"
|
||||
complete -c embed_subtitles -a "(__fish_custom_scripts_complete_video_files)"
|
||||
complete -c embed_subtitles.py -d "Embed matching .srt subtitles into video"
|
||||
complete -c embed_subtitles.py -a "(__fish_custom_scripts_complete_video_files)"
|
||||
|
||||
# === Scripts accepting directories ===
|
||||
complete -c recount_files -d "Re-number files starting from given offset"
|
||||
complete -c recount_files -a "(__fish_complete_directories)"
|
||||
complete -c remove_fname_last_n -d "Remove last N characters from filenames (before ext)"
|
||||
complete -c remove_fname_last_n -a "(__fish_complete_directories)"
|
||||
complete -c rename_to_first_n -d "Truncate filenames to first N characters (before ext)"
|
||||
complete -c rename_to_first_n -a "(__fish_complete_directories)"
|
||||
complete -c rename_filtered -d "Rename files using character scheme"
|
||||
complete -c rename_filtered -a "(__fish_complete_directories)"
|
||||
|
||||
# === Scripts with special argument patterns ===
|
||||
complete -c create_folder_counting -d "Create folders with counting range"
|
||||
complete -c create_folder_date -d "Create folders for each date in date range"
|
||||
complete -c filter_extra -d "Move MKVs shorter than duration to extra folder"
|
||||
complete -c grayjay -d "Launch Grayjay desktop application"
|
||||
complete -c sub_dub.py -d "Update spreadsheet row with media info"
|
||||
complete -c substract_episode_num.py -a "(__fish_complete_directories)"
|
||||
|
||||
# Skipped (folder-only):
|
||||
# fftesting, sync_delete, rename_episodes
|
||||
@@ -10,6 +10,9 @@ if status is-interactive
|
||||
set distro unknown
|
||||
end
|
||||
|
||||
# Auto Complete
|
||||
source ~/.config/fish/completions/*
|
||||
|
||||
if test -f $HOME/.config/fish/configs/theme.fish
|
||||
source $HOME/.config/fish/configs/theme.fish
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user