-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpython3clean.fish
More file actions
28 lines (22 loc) · 802 Bytes
/
Copy pathpython3clean.fish
File metadata and controls
28 lines (22 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
false && begin # example
% python3clean
Python 3.13.3 \(main, Apr 9 2025, 07:44:25\) [GCC 14.2.1 20250207] on linux
\>\>\>
end
false && begin # note
By default, the Python 3 REPL starts like this:
```shell
% python3
Python 3.13.3 \(main, Apr 9 2025, 07:44:25\) [GCC 14.2.1 20250207] on linux
Type "help", "copyright", "credits" or "license" for more information.
\>\>\>
```
Notice the extra line that starts with "Type...". We don\'t need that line.
This function removes it.
Tip: this function has a long name so I suggest putting an alias on it.
end
function python3clean -d "Start the Python 3 REPL without the extra info line"
set -l pyline (python3 -S -c "import sys; print(f'Python {sys.version} on {sys.platform}')")
echo $pyline
python3 -q
end