Remove private_ prefix from fish dir's
This commit is contained in:
5
dot_config/fish/functions/369/a4/block-to-line.fish
Executable file
5
dot_config/fish/functions/369/a4/block-to-line.fish
Executable file
@@ -0,0 +1,5 @@
|
||||
function block-to-line
|
||||
set block_size 1024
|
||||
set bytes_per_line 16
|
||||
math "($block_size*$argv[1])/$bytes_per_line + 1"
|
||||
end
|
||||
15
dot_config/fish/functions/369/a4/executable_revert-image.fish
Executable file
15
dot_config/fish/functions/369/a4/executable_revert-image.fish
Executable file
@@ -0,0 +1,15 @@
|
||||
function revert-image
|
||||
set img_file 'emptydisk.img'
|
||||
switch $argv[1]
|
||||
case 1
|
||||
set img_file 'onefile.img'
|
||||
case m
|
||||
set img_file 'multilevel.img'
|
||||
case l
|
||||
set img_file 'largefile.img'
|
||||
case s
|
||||
set img_file 'symlink.img'
|
||||
end
|
||||
|
||||
cp imgs{-cp,}/$img_file
|
||||
end
|
||||
12
dot_config/fish/functions/369/a4/hex.fish
Executable file
12
dot_config/fish/functions/369/a4/hex.fish
Executable file
@@ -0,0 +1,12 @@
|
||||
function hex
|
||||
switch $argv[1]
|
||||
case h
|
||||
# print dec/bin.
|
||||
printf "%d " (echo "ibase=16;obase=A;$argv[2]" | bc)
|
||||
printf "%d\n" (echo "ibase=16;obase=2;$argv[2]" | bc)
|
||||
case d
|
||||
# print hex/bin.
|
||||
printf "%s " (echo "obase=16;$argv[2]" | bc)
|
||||
printf "%d\n" (echo "obase=2;$argv[2]" | bc)
|
||||
end
|
||||
end
|
||||
3
dot_config/fish/functions/369/a4/mount-image.fish
Executable file
3
dot_config/fish/functions/369/a4/mount-image.fish
Executable file
@@ -0,0 +1,3 @@
|
||||
function mount-image
|
||||
sudo mount $argv[1] /mnt/369-a4
|
||||
end
|
||||
35
dot_config/fish/functions/369/a4/run-a4.fish
Executable file
35
dot_config/fish/functions/369/a4/run-a4.fish
Executable file
@@ -0,0 +1,35 @@
|
||||
function run-a4
|
||||
# 1 = ex, 2 = img
|
||||
printf '\033c'
|
||||
# and bear make clean
|
||||
bear make
|
||||
|
||||
set img_file 'imgs/emptydisk.img'
|
||||
switch $argv[2]
|
||||
case 1
|
||||
set img_file 'imgs/onefile.img'
|
||||
case m
|
||||
set img_file 'imgs/multilevel.img'
|
||||
case l
|
||||
set img_file 'imgs/largefile.img'
|
||||
case s
|
||||
set img_file 'imgs/symlink.img'
|
||||
end
|
||||
|
||||
switch $argv[1]
|
||||
case h
|
||||
./ext2_helpers_tester $img_file
|
||||
case hg
|
||||
gdb -ex "run" -ex "bt" -ex "q" \
|
||||
--args ./ext2_helpers_tester './imgs/multilevel.img' '/level1/level2/level3//'
|
||||
case m
|
||||
./ext2_mkdir $img_file '/'
|
||||
# ./ext2_mkdir 'imgs/multilevel.img' '/level1/level2/bfile'
|
||||
case rg
|
||||
./readimage $img_file
|
||||
gdb -ex "run" -ex "bt" -ex "q" \
|
||||
--args ./readimage './imgs/symlink.img'
|
||||
case '*'
|
||||
./readimage $img_file
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user