BashSpark
Loading...
Searching...
No Matches
shell_tools.h File Reference

Provides some simple tools used on command expansion. More...

#include <string>
#include <vector>
#include "BashSpark/tools/utf.h"
#include "BashSpark/shell/shell_parser.h"
Include dependency graph for shell_tools.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  bs
 BashSpark main namespace.
 

Functions

std::vector< std::string > bs::split_string (const std::string_view &oString)
 Splits a string into a vector.
 
void bs::split_string (std::vector< std::string > &vStrings, const std::string_view &oString)
 Splits a string into a vector.
 
void bs::insert_vector (std::vector< std::string > &vDestiny, std::vector< std::string > vOrigin)
 Moves appends the contents of the origin vector into the destination vector.
 
void bs::concat_vector (ofakestream &oOstream, const std::vector< std::string > &vOrigin)
 Writes the contents of a vector<string> on an output stream.
 
std::int64_t bs::get_pid ()
 Gets the PID process of the shell On non recognized platforms returns 0.
 
shell_keyword bs::get_keyword_id (const std::string_view &oString)
 Identifies shell special keywords.
 
shell_keyword bs::get_keyword_id (const std::string &oString)
 Identifies shell special keywords.
 

Detailed Description

Provides some simple tools used on command expansion.

Date
Created on 2/11/25
Author
Dante Doménech Martínez

This file is part of BashSpark. Copyright (C) 2025 Dante Doménech Martínez

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.