Git Product home page Git Product logo

cle's People

Contributors

josephlemmons avatar limmones avatar mdujava avatar micharbet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cle's Issues

Allow different configs cf-HOSTNAME

We have a few servers that share the /home partition via NFS.
In that case it is useful to have different config (colors) for each server.
Default is ~/.cle-username/cf
Server specific version is ~/.cle-user/cf-hostname
It has to be created manually.
This tweak does it:
[[ -r $CLE_D/cf-$CLE_SHN ]] && CLE_CF=$CLE_D/cf-$CLE_SHN

Error on startup on Mac OS

When starting new instance of cle on the new version on Mac OS, this error happens:

readlink: illegal option -- f
usage: readlink [-n] [file ...]

PIPESTATUS

Can you add some info about PIPESTATUS to rich history?

like
hody@x230:/tmp:true | false | true | false
hody@x230:/tmp:echo ${PIPESTATUS[@]}
0 1 0 1

clerc complains about bash-completion package

It would be nice if CLE detects the missing required packages or ask permission to install them.

[savitoj@savitoj-test ~]$ . clerc
-bash: /usr/share/bash-completion/bash_completion: No such file or directory
 It seems you started CLE running '/home/savitoj/.cle-savitoj/rc1' from command line
 Since this is the first run, consider setup in your profile.

cc: @micharbet

/var/tmp mounted noexec

Hello,

I often set /var to be mounted noexec for security reasons.
Is there a way to set the old behavior of using ~/.cle-user/ instead of /var/tmp/user/.cle-user/ ?

Now I get:
$ lssh server
bash: line 4: /var/tmp/xxxx/.cle-xxxx/yyyy: Permission denied
bash: line 4: exec: /var/tmp/xxxx/.cle-xxxx/yyyy: cannot execute: Permission denied
Connection to server closed.

Chování v rámci shellu v Midnight Commanderu

If there is mc started in CLE, and any command in it - there is an error (even if command is processed correctly):

[0] 12:56:31 msiebenb  ~ $ date
St 14. října 2020, 12:56:32 CEST
bash: [: příliš mnoho argumentů
[0] 12:56:32 msiebenb  ~ $ 

Milan Siebenbürger

Add full hostname to prompt

Hello Michal,

thanks for nice presentation yesterday at OpenAlt. Consider this as a wishlist item:

Even during the presentation I asked about showing full hostname (FQDN) on the prompt. There is obvious solution to use standard bash "\H", but it is not working every time. At least in debian, it just shows whatever you have set in /etc/hostname, and that is by default only the first part of the hostname. All the rest is usually in /etc/resolv.conf as domain or search option. So what I really would appreciate is an option to put %H in prompt which would equal to hostname -f.

The reason is that I maintain servers for different companies, and the names tend to repeat (mail.company.com, samba, hyperX, gate, ...) so I need to see the full name.

So far I have to edit /etc/hostname to contain FQDN, and change \h to \H in PS1 definition in bashrc.

Best Regards
Vladki

misbehaving prompt composition in live sessions

The prompt composition in live sessions is either not working properly, it might tthow an error abou non existing file or permission error. Or in other case - using lsu/lsudo on worstation, commands cle color and cle pX change configuration of original user.

ls /nonexistend_dir doesn't return proper error code

Looks like CLE doesn't return proper error code when using ls command:

[0] pruzicka@peru /tmp:$ ls /nonexistent_dir
ls: cannot access '/nonexistent_dir': No such file or directory
[0] pruzicka@peru /tmp:$ ls /nonexistent_dir; echo $?
ls: cannot access '/nonexistent_dir': No such file or directory
2
[0] pruzicka@peru /tmp:$

Thanks for looking at it...

"Alias" 'cle -h' and 'cle --help' to cle help

Here is an idea. Add options -h and --help to cle command, so that people don't have to remember that for help they need 'cle help' exactly. The option -h doesn't seem to be taken by anything else.

rich history removes semicolon from commands on some systems

e.g on RHEL and Centos following has been observed:
issued command:
tail $CLE_HIST | { IFS=';'; while read -r DT SID SEC EC D C; do echo $C; done; }
rich history output:
tail $CLE_HIST | { IFS=' ' while read DT SID SEC EC D C do echo $C done }

This doesn't happen on fedora nor debian

Best way to override lssh

Hey there, where would be the best place to override the lssh function? I would like to use mosh instead of ssh but also to be able to update cle and keep it "viral" :-)
Thank you!

Regular shell history doesn't show other's admins entries

There was a split in history files. While other administrators on the server were using default history file (.bash_history) the ones using CLE had their personal settings one and used $CLE_D/history-bash. The issue has been reported with strong need to use history or h commands to see all previous commands from all users, regardless if they use CLE or not.

Analysis: Personalization of history file has been one of the first tweaks in CLE.It was useful that time. On the other side there is rich history that was introduced in later release (Nova) and it's ability is also to show only particular user's entries while filtering out the rest.

Proposal: Stop meesing up with the default history settings (not only the file) leaving it all on user.

Received bash auto-completion error when logging on as a user

Every time when I use lssh to login to a server, after logging in, I receive the following error message:

bash: /usr/share/bash-completion/bash_completion: No such file or directory

This has been only on Red Hat internal systems as none of my personal systems are affected by this error message.

CLE doesn't display /etc/motd

Message of the day should be displayed upon remote login. Some might find important information in it. reported by: @vhodina

cle color set not remembered (set to an empty string)

When I tried to set a color for the prompt, it worked fine until I logged out.
When i logged back in, the CLE complained about non-existent color.

# cle color yellow
[0] 15:34 root xray136 ~ #
--- logged out ---

after logging in:

Unknown color '' Select one of predefined:

psg from mod-fsps does not work

psg whatever fails - no output, return value 1:

Maybe just missing parentheses:


[0] 00:13 vladki hex ~/.cle-vladki: $ ps -ef | grep bash | grep -v grep
vladki    2336  2327  0 lis07 pts/0    00:00:00 /bin/bash
vladki    2683  2327  0 lis07 pts/1    00:00:01 /bin/bash
vladki    5736  2327  0 lis07 pts/2    00:00:01 /bin/bash
vladki    6455  2327  0 lis07 pts/3    00:00:00 /bin/bash
[0] 00:13 vladki hex ~/.cle-vladki: $ psg bash
[1] 00:14 vladki hex ~/.cle-vladki: $ [ bash ]
[0] 00:14 vladki hex ~/.cle-vladki: $ [ bash ] || cle help
[0] 00:14 vladki hex ~/.cle-vladki: $ [ bash ] || cle help && false
[1] 00:14 vladki hex ~/.cle-vladki: $ psg
 psg name   -- ps | grep
[1] 00:15 vladki hex ~/.cle-vladki: $ 
[1] 00:17 vladki hex ~/.cle-vladki: $ [ bash ] || ( cle help && false )
[0] 00:17 vladki hex ~/.cle-vladki: $ 

Warn on cle deploy when .bash_prompt is active

Hi,

firstly, thanks for a great tool!

I am trying to use in on the HypriotOS, but strugged to get it working before I relalized that the OS itself comes with a custom ~/.bash_prompt, which sets the prompt colors. After the removal (rename) of the ~/.bash_prompt the CLE works great, it just took me some time to figure out the issue.

My environment:
$ uname -a
Linux proxy 4.14.34-hypriotos-v7+ #1 SMP Sun Apr 22 14:57:31 UTC 2018 armv7l GNU/Linux

How to induce the problem.

  1. login to an environment, where ~/.bash_prompt is created and called from ~/.profile
  2. wget -O /tmp/clerc http://git.io/clerc
  3. . /tmp/clerc
  4. cle deploy
  5. confirm the deployment with y

Output:

  • the command prompt is not changed even after re-login

Expected behaviour:

  • The cle deploy command warns the user that there is .bash_prompt which might collide with CLE.

Thank you,

Martin

keep the current shell after lsu/lsudo

Hello Michal,

I have access to a server where the "root" prefers /bin/zsh, and has it in /etc/passwd, while I prefer /bin/bash.

With the old version, when I did lsudo, I had still bash. But with the new version I get zsh and this error:

$ lsudo
[sudo] password for vladki: 
[.zshrc]
/var/tmp/root/.zshrc:727: no match

And a zsh prompt, not affected by CLE. /var/tmp/root/.zshrc is symlink to /var/tmp/vladki/.cle-vladki/rc-xxxx

conflict with .bash_aliases

Some systems have this code in .bashrc by default:

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

The problem is if there are aliases defined which happen to have the same names as functions defined by CLE. Although there is unalias aa h hh .. ... at the beginning of CLE/rc, it runs ~/.bashrc later and thus all stuff from .bash_aliases is created.

IMHO the unalias ... should be called after sourcing ~/.bashrc (or any external file that could introduce any aliases), or even better, call unalias before defining any internal function. (And best would be to print a warning if an alias was really removed, so the user knows that his good old alias was overriden by CLE).

Exaples I found so far are .. ... (with the same meaning as in CLE) and vdump = virsh dump

CLE_Px incompatible change in new version

Hello, after long time I tried to update CLE, and found out that my prompt is all wrong.
After several "cle cf reset" and "cle cf revert" and login/logout I ended up with the defaults, which are at least useable.
But the problem is that I have my tweaked prompt in cf-hostname, all around on many servers an this is getting very very broken. I see that you moved from %x to ^x notation. Is it possible to get some backwards compatibility with the old prompt notation?

[Feature request] Shared aliases

Idea:
CLE will manage some config file with aliases (let's say cle sa ll="ls -la") and those aliases will be available on all sessions initiated from cle.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.