|
1 | | -from _typeshed import StrOrBytesPath |
2 | | -from collections.abc import Callable, Mapping |
3 | | -from typing import Any, TypeVar |
4 | | -from typing_extensions import ParamSpec, Self, TypeAlias |
| 1 | +# ~/.profile: executed by the command interpreter for login shells. |
| 2 | +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login |
| 3 | +# exists. |
| 4 | +# see /usr/share/doc/bash/examples/startup-files for examples. |
| 5 | +# the files are located in the bash-doc package. |
5 | 6 |
|
6 | | -__all__ = ["run", "runctx", "Profile"] |
| 7 | +# the default umask is set in /etc/profile; for setting the umask |
| 8 | +# for ssh logins, install and configure the libpam-umask package. |
| 9 | +#umask 022 |
7 | 10 |
|
8 | | -def run(statement: str, filename: str | None = None, sort: str | int = -1) -> None: ... |
9 | | -def runctx( |
10 | | - statement: str, globals: dict[str, Any], locals: Mapping[str, Any], filename: str | None = None, sort: str | int = -1 |
11 | | -) -> None: ... |
| 11 | +# if running bash |
| 12 | +if [ -n "$BASH_VERSION" ]; then |
| 13 | + # include .bashrc if it exists |
| 14 | + if [ -f "$HOME/.bashrc" ]; then |
| 15 | + . "$HOME/.bashrc" |
| 16 | + fi |
| 17 | +fi |
12 | 18 |
|
13 | | -_T = TypeVar("_T") |
14 | | -_P = ParamSpec("_P") |
15 | | -_Label: TypeAlias = tuple[str, int, str] |
| 19 | +# set PATH so it includes user's private bin if it exists |
| 20 | +if [ -d "$HOME/bin" ] ; then |
| 21 | + PATH="$HOME/bin:$PATH" |
| 22 | +fi |
16 | 23 |
|
17 | | -class Profile: |
18 | | - bias: int |
19 | | - stats: dict[_Label, tuple[int, int, int, int, dict[_Label, tuple[int, int, int, int]]]] # undocumented |
20 | | - def __init__(self, timer: Callable[[], float] | None = None, bias: int | None = None) -> None: ... |
21 | | - def set_cmd(self, cmd: str) -> None: ... |
22 | | - def simulate_call(self, name: str) -> None: ... |
23 | | - def simulate_cmd_complete(self) -> None: ... |
24 | | - def print_stats(self, sort: str | int = -1) -> None: ... |
25 | | - def dump_stats(self, file: StrOrBytesPath) -> None: ... |
26 | | - def create_stats(self) -> None: ... |
27 | | - def snapshot_stats(self) -> None: ... |
28 | | - def run(self, cmd: str) -> Self: ... |
29 | | - def runctx(self, cmd: str, globals: dict[str, Any], locals: Mapping[str, Any]) -> Self: ... |
30 | | - def runcall(self, func: Callable[_P, _T], /, *args: _P.args, **kw: _P.kwargs) -> _T: ... |
31 | | - def calibrate(self, m: int, verbose: int = 0) -> float: ... |
| 24 | +# set PATH so it includes user's private bin if it exists |
| 25 | +if [ -d "$HOME/.local/bin" ] ; then |
| 26 | + PATH="$HOME/.local/bin:$PATH" |
| 27 | +fi |
0 commit comments