From 115cc27152766cc0b315d25ae5b58bfdc9414504 Mon Sep 17 00:00:00 2001 From: quak Date: Tue, 29 Apr 2025 08:51:10 +0200 Subject: [PATCH] initial commit --- bash | 9 +++ rust/.gitignore | 2 + rust/Cargo.toml | 9 +++ rust/application | 1 + rust/rust-toolchain | 1 + rust/src/main.rs | 8 ++ rust/test.txt | 192 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 222 insertions(+) create mode 100755 bash create mode 100644 rust/.gitignore create mode 100644 rust/Cargo.toml create mode 120000 rust/application create mode 100644 rust/rust-toolchain create mode 100644 rust/src/main.rs create mode 100644 rust/test.txt diff --git a/bash b/bash new file mode 100755 index 0000000..c7b097e --- /dev/null +++ b/bash @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +#pid="$$" +#echo "scripts pid: ${pid}" +#echo "shells pid (hopefully): $(ps -o ppid)" + +echo "pids[-2]: ${pids[-2]}" +path=$(pwd) +echo "$path" diff --git a/rust/.gitignore b/rust/.gitignore new file mode 100644 index 0000000..a9d37c5 --- /dev/null +++ b/rust/.gitignore @@ -0,0 +1,2 @@ +target +Cargo.lock diff --git a/rust/Cargo.toml b/rust/Cargo.toml new file mode 100644 index 0000000..1dc57fb --- /dev/null +++ b/rust/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "rust" +version = "0.1.0" +edition = "2021" + +[dependencies] +clap = { version = "4.5.0", features = ["derive"] } +dirs = "5.0.1" + diff --git a/rust/application b/rust/application new file mode 120000 index 0000000..7ff5d4a --- /dev/null +++ b/rust/application @@ -0,0 +1 @@ +target/debug/rust \ No newline at end of file diff --git a/rust/rust-toolchain b/rust/rust-toolchain new file mode 100644 index 0000000..2bf5ad0 --- /dev/null +++ b/rust/rust-toolchain @@ -0,0 +1 @@ +stable diff --git a/rust/src/main.rs b/rust/src/main.rs new file mode 100644 index 0000000..483cd67 --- /dev/null +++ b/rust/src/main.rs @@ -0,0 +1,8 @@ +#![allow(dead_code, unused)] + +use std::io::{Error, Result}; + +fn main() -> Result<()> { + Ok(()) +} + diff --git a/rust/test.txt b/rust/test.txt new file mode 100644 index 0000000..e302652 --- /dev/null +++ b/rust/test.txt @@ -0,0 +1,192 @@ +DeriveInput { + attrs: [], + vis: Visibility::Public( + Pub, + ), + ident: Ident { + ident: "Settings", + span: #0 bytes(1363..1371), + }, + generics: Generics { + lt_token: None, + params: [], + gt_token: None, + where_clause: None, + }, + data: Data::Struct { + struct_token: Struct, + fields: Fields::Named { + brace_token: Brace, + named: [ + Field { + attrs: [ + Attribute { + pound_token: Pound, + style: AttrStyle::Outer, + bracket_token: Bracket, + meta: Meta::Path { + leading_colon: None, + segments: [ + PathSegment { + ident: Ident { + ident: "nested_config", + span: #0 bytes(1380..1393), + }, + arguments: PathArguments::None, + }, + ], + }, + }, + ], + vis: Visibility::Public( + Pub, + ), + mutability: FieldMutability::None, + ident: Some( + Ident { + ident: "general", + span: #0 bytes(1403..1410), + }, + ), + colon_token: Some( + Colon, + ), + ty: Type::Path { + qself: None, + path: Path { + leading_colon: None, + segments: [ + PathSegment { + ident: Ident { + ident: "GeneralSettings", + span: #0 bytes(1412..1427), + }, + arguments: PathArguments::None, + }, + ], + }, + }, + }, + Comma, + Field { + attrs: [ + Attribute { + pound_token: Pound, + style: AttrStyle::Outer, + bracket_token: Bracket, + meta: Meta::Path { + leading_colon: None, + segments: [ + PathSegment { + ident: Ident { + ident: "nested_config", + span: #0 bytes(1435..1448), + }, + arguments: PathArguments::None, + }, + ], + }, + }, + ], + vis: Visibility::Public( + Pub, + ), + mutability: FieldMutability::None, + ident: Some( + Ident { + ident: "format", + span: #0 bytes(1458..1464), + }, + ), + colon_token: Some( + Colon, + ), + ty: Type::Path { + qself: None, + path: Path { + leading_colon: None, + segments: [ + PathSegment { + ident: Ident { + ident: "FormatSettings", + span: #0 bytes(1466..1480), + }, + arguments: PathArguments::None, + }, + ], + }, + }, + }, + Comma, + Field { + attrs: [ + Attribute { + pound_token: Pound, + style: AttrStyle::Outer, + bracket_token: Bracket, + meta: Meta::Path { + leading_colon: None, + segments: [ + PathSegment { + ident: Ident { + ident: "nested_config", + span: #0 bytes(1488..1501), + }, + arguments: PathArguments::None, + }, + ], + }, + }, + Attribute { + pound_token: Pound, + style: AttrStyle::Outer, + bracket_token: Bracket, + meta: Meta::Path { + leading_colon: None, + segments: [ + PathSegment { + ident: Ident { + ident: "no_config", + span: #0 bytes(1509..1518), + }, + arguments: PathArguments::None, + }, + ], + }, + }, + ], + vis: Visibility::Public( + Pub, + ), + mutability: FieldMutability::None, + ident: Some( + Ident { + ident: "styles", + span: #0 bytes(1528..1534), + }, + ), + colon_token: Some( + Colon, + ), + ty: Type::Path { + qself: None, + path: Path { + leading_colon: None, + segments: [ + PathSegment { + ident: Ident { + ident: "StyleSettings", + span: #0 bytes(1536..1549), + }, + arguments: PathArguments::None, + }, + ], + }, + }, + }, + Comma, + ], + }, + semi_token: None, + }, +} \ No newline at end of file