Skip to content

Commit 08faa00

Browse files
docs: add small section about xonsh and fix old style documentation (#60)
1 parent 08fc275 commit 08faa00

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This is an example of a configuration file:
3434
```yaml
3535
version: 1.0.0
3636
groups:
37-
- name: default
37+
default:
3838
env-file: .env
3939
targets:
4040
clean:
@@ -107,3 +107,57 @@ If you have any problem, open an issue at: https://github.com/osl-incubator/maki
107107

108108
As you can see, the help menu automatically adds information defined by all
109109
the `help` key, inside the `.makim.yaml` file.
110+
111+
## Xonsh Shell Integration
112+
113+
### What is Xonsh?
114+
[Xonsh](https://xon.sh/) is a powerful shell language and command prompt designed to
115+
seamlessly blend traditional shell capabilities with the expressive syntax of Python.
116+
It offers an interactive and extensible environment that enables users to transition
117+
effortlessly between standard shell commands and Python scripting.
118+
119+
### How Xonsh enhances this Project?
120+
In the context of this project, Xonsh serves as the default shell for executing commands
121+
defined in the Makim configuration. By leveraging Xonsh, the Makim tool gains the flexibility
122+
and richness of the Python programming language within a command-line interface. This integration
123+
allows users to create sophisticated tasks and harness the full power of Python directly
124+
in the terminal.
125+
126+
### Key Features and Commands in Xonsh
127+
1. **Unified Syntax :** Xonsh seamlessly integrates traditional shell syntax with Python's
128+
clean and expressive syntax, creating a unified and consistent scripting experience.
129+
```
130+
# Shell-style command
131+
ls -l
132+
133+
# Python-style variable assignment
134+
$filename = "example.txt"
135+
136+
# Combining both in a single command
137+
echo "The contents of $filename are: $(cat $filename)"
138+
```
139+
140+
2. **Python Variables and Expressions :** Python variables can be easily incorporated into
141+
commands, enhancing the readability and flexibility of your scripts.
142+
```
143+
$filename = "example.txt"
144+
echo "The filename is $filename"
145+
```
146+
147+
3. **Looping and Conditional Statements :** Use Python-style loops and conditionals to create
148+
dynamic and complex command sequences.
149+
```
150+
for $i in range(3):
151+
echo "Iteration $i"
152+
```
153+
154+
4. **Extensible Tab Completion :** Xonsh offers extensible and intelligent tab completion,
155+
making it easier to discover and complete commands and variables.
156+
```
157+
$long_variable_name = "some_value"
158+
echo $long_<TAB>
159+
# Xonsh will intelligently complete the variable name
160+
```
161+
162+
For more comprehensive information and documentation, explore the [Xonsh GitHub repository]
163+
(https://github.com/xonsh/xonsh) and the official [Xonsh website](https://xon.sh/).

0 commit comments

Comments
 (0)