feat(shell): add poke, _fish_mkdir_p utility, and update fish-deps for ov/yay #28

Merged
rootiest merged 5 commits from feat/poke-and-fish-deps-ov-yay into main 2026-06-04 03:31:25 +00:00
3 changed files with 28 additions and 8 deletions
Showing only changes of commit c2afa1201f - Show all commits
+2 -2
View File
@@ -44,12 +44,12 @@ function _fish_mkdir_p --description 'mkdir -p with configurable verbose output'
if test $mode = path
set -l display (string replace -- "$HOME" "~" $target)"/"
echo (set_color --bold cyan)"Created: "(set_color cyan)"$display"(set_color normal)
echo (set_color --bold cyan)"Created directory: "(set_color cyan)"$display"(set_color normal)
return 0
end
# Tree mode: dimmed existing anchor, then cyan new dirs.
echo (set_color --bold cyan)"Created missing directories:"(set_color normal)
echo (set_color --bold yellow)"Created directories:"(set_color normal)
set -l anchor (string replace -- "$HOME" "~" $cursor)"/"
echo (set_color brblack)" $anchor"(set_color normal)
set -l i 1
+16 -5
View File
@@ -22,6 +22,7 @@ function mkcd --description 'Create a directory (with parents) and cd into it'
echo
echo "$c_head""Flags:$c_rst"
echo " $c_flag-h$c_rst, $c_flag--help$c_rst Show this help message"
echo " $c_flag-s$c_rst, $c_flag--silent$c_rst Suppress directory creation output"
echo
echo "$c_head""Examples:$c_rst"
echo " $c_cmd""mkcd$c_rst $c_arg~/projects/myapp$c_rst"
@@ -29,13 +30,23 @@ function mkcd --description 'Create a directory (with parents) and cd into it'
return 0
end
set -l dir $argv[1]
set -l silent 0
set -l dir
for _arg in $argv
switch $_arg
case -s --silent
set silent 1
case '*'
set dir $_arg
end
end
set -l is_new 0
if not test -d $dir
set is_new 1
command mkdir -p $dir
or return $status
test -d $dir; or set is_new 1
if test $silent -eq 1
_fish_mkdir_p --silent $dir; or return $status
else
_fish_mkdir_p --tree $dir; or return $status
end
cd $dir
+10 -1
View File
@@ -4,7 +4,16 @@
# Execute mkdir
function mkdir --description 'Execute mkdir'
if status is-interactive
command mkdir -p $argv
# Fall back to command mkdir -p when flags are present (e.g. -m 755)
for _arg in $argv
if string match -q -- '-*' $_arg
command mkdir -p $argv
return $status
end
end
for _dir in $argv
_fish_mkdir_p --path $_dir
end
else
command mkdir $argv
end